Wednesday, December 03, 2008

Compiling 2.6.28 rc9 Vanilla on Hardy - Ubuntu/Debian Way

This article is about compiling a Kernel on Ubuntu systems. It describes how to build a custom kernel using the latest unmodified kernel sources from www.kernel.org (Vanilla Kernel) so that you are independent from the kernels supplied by your distribution.

Rc kernel patches are generated from the base stable release.

For example: to create the 2.6.28-rc9 kernel, you must:

  • download 2.6.27 (not 2.6.28.x)
  • and then apply the 2.6.28-rc9 patch.

Yes, you want 2.6.27 not 2.6.28. Remember, that's an -rc kernel, as in, 2.6.28 doesn't exist yet. :)

seems tha the kernel you want is prepatch , choose B from this area "The latest prepatch for the stable Linux kernel tree is" also choose 2.6.28-rc9 the same area.

$ cd /usr/src

$ sudo su

# wget --continue http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.27.tar.bz2

# tar jxvf linux-2.6.27.tar.bz2

# wget http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.28-rc9.bz2

# bunzip2 patch-2.6.28-rc9.bz2

# cd linux-2.6.27

# patch -p1 < ../patch-2.6.28-rc9

#cd ..
#mv linux-2.6.27 linux-2.6.28-rc9

# cd linux-2.6.28-rc9/

# cp /boot/config-`uname -r` ./.config

# make menuconfig

Enable Preemptition Model for Low Latency (near realtime)

Processor Type and Features> Preemptiton Model (Preemtible Kernel(Low-Latency Desktop))

You must disable xen support

Processor Type and Features -> Paravirtualized Guest Support -> Xen

support otherwise you will get this error

$ sudo make-kpkg clean
$ sudo fakeroot make-kpkg --initrd --append-to-version=-vanillaice kernel_image kernel_headers
$ cd ..

dpkg -i linux-image-2.7.28-* in my case

$shutdown -r

now you can install the headers too from /usr/src/linux-headers-2.6.28*

If you want to build it Vanilla way without debian tools then consult this page http://kernelnewbies.org/KernelBuild

1 comment:

Anonymous said...

Thank You.