Patching and Building the Linux Kernel

From Bennet

Revision as of 13:22, 7 July 2009 by 192.168.0.16 (Talk)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

This is how I build and install a new kernel. I have little experience with any GNU/Linux distribution as I run my own distribution, but this should give a little overview.


lftpget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2
lftpget http://kernel.org/pub/linux/kernel/v2.6/patch-2.6.23.11.bz2
lftpget http://www.kernel.org/pub/linux/kernel/projects/rt/older/patch-2.6.23.11-rt14.bz2
tar -jxf linux-2.6.23.tar.bz2
bzip2 -d patch-2.6.23.11.bz2
bzip2 -d patch-2.6.23.22-rt14.bz2
cd linux-2.6.23
patch -Np1 < ../patch-2.6.23.11
patch -Np1 < ../patch-2.6.23.11-rt14
make clean
make menuconfig # At this point, configure the kernel as showed below
make
cp arch/i386/boot/bzImage /boot/linux-2.6.23.11-rt14
cp System.map /boot/System.map-2.6.23.11-rt14
#Reboot the system

When rebooting the system, you type in f.ex in GRUB:

hd(0,0)/boot/linux-2.6.23.11-rt14 root=/dev/sda1
boot
Personal tools