Skip to main content

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

Comments

Popular posts from this blog

opensuse repair is awesome

I installed OpenSuse 11.1 on my machine. I have done kde4/kde3/gnome installation. It takes about 40-45 minutes. After instaltion I installed Nvidia driver, nvidia driver has installed new kernel (containing trace in name). When I changed boot order to make trace default kernel, grub is installed on root partition than MBR, so my system become unbootable. I got only 2 days of holidays. I come to know abt this problem after I returned to my work city (Indore) from Home (Khandwa). So I could not fix the problem. So I have to fix it via phone. My brother booted the system with Opensuse 11.1 dvd. My brother is not very technical person but he is advace-level PC user. We have never used recover/rescue installed system option. We selected automated recovery mode. It first checks all partitions and packages, all of them found is good state, setup found error boot loader configuration, we loaded boot loader configuration from disk and found that grub is installed on root partition instead of M...

Installing Ralink 3090 wifi driver

I installed Kubuntu 10.10 on my new laptop, my laptop is Compaq CQ62- 308AX. It has Ralink 3090 wifi, which is not automatically detected by Kubuntu. Even restricted driver manager does not show any option for this device. So I downloaded the driver from Ralink site (http://www.ralinktech.com/support.php?s=2).  It is in the source format. I thought I might have to patch the kernel source. I went through the readme file and I found that I don’t have to compile kernel ( yippee an hr saved). Only device driver source is needed to be compile. These days things are much more simple. So I compiled the driver by running command “make” and installed it by “make install”.  It has compiled other ralink wifi modules along with 3090 module. After installation (using ‘make install’)  reboot the machine, reboot is not necessary in Linux after installing driver.  After reboot it loaded incorrect  rt2086 module. So I tried manually unloading and loading module using insmode...

Adding additional class to a button in drupal

Recently we were building a multi-domain site, we are using same theme for all sites but we want to have different colors for buttons for each domain. We achieved this using my overriding theme_button in template.php of theme, here is the snippet. /** * Overwrite theme_button() * @file template.php */ function mytheme_button($variables) { $element = $variables['element']; // Add some extra conditions to make sure we're only adding // the classto the right submit button Now add our custom class if (isset($element['#attributes'])) { $element['#attributes']['class'] [] = 'button'; $domain = domain_get_domain(); $element['#attributes']['class'] [] = $domain['machine_name']; } $variables['element'] = $element; return theme_button($variables); }