Tuesday, September 26, 2006

Compiling Linux Kernel

    I'm writing a short how-to to compile linux kernel. This process is for 2.6 series of kernel. Building kernel requires no programing knowledge. All it require is knowledge of hardware u have. Compiling kernel for ur system improves performance of ur system as much as 40% depending on ur system configuration.
    First download latest linux kernel from kernel.org. At the time of writing 2.6.18 kernel is released. Downlaod linux-2.6.18.tar.gz file. Extract this using tar zxvf linux-2.6.18.tar.gz. This will extract all files in foler linux-2.6.18. cd to this foler.
    Now u have to configure kernel for your system. To configure kernel run
make menuconfig
or
make xconfig
    This command will open an window. In this select/deselect option for ur system. Deselect all other driver for devices that you don't have and select only those devices that u have.
For example if u have intel motherboard, then in audio driver enable only intel driver and disale all other sound card drivers.
After completing configuration save and exit.
Now run
make bzImage
This will build kernel for ur system.
Then
make modules
This will build kernel modules for ur system. Now install modules using
make modules_install
And finally install kernel bu running command
make install
This will also update ur bootloader (if grub) entries. Now reboot into newly build kernel.


powered by performancing firefox