How to compile the Linux kernel

Here are my steps for compiling the Linux kernel (2.6) on Slackware 13.1:

  • download the kernel from http://www.kernel.org (e.g. linux-2.6.35.9.tar.bz2)
  • login as root
  • copy the compressed kernel to /usr/src
  • # cd /usr/src
  • # tar jxvf linux-2.6.35.9.tar.bz2
  • # rm linux
  • # ln -s linux-2.6.35.9 linux
  • # cd linux
  • # make mrproper
  • # cp /boot/config .config
  • # make oldconfig (keep default answers)
  • # make -j2
  • # make modules_install
  • # cp System.map /boot/System.map-huge-smp-2.6.35.9-smp
  • # cp .config /boot/config-huge-smp-2.6.35.9-smp
  • # cp arch/x86/boot/bzImage /boot/vmlinuz-huge-smp-2.6.35.9-smp
  • # vim /etc/lilo.conf –> add the following lines:
  • image = /boot/vmlinuz-huge-smp-2.6.35.9-smp
    root = /dev/sdb3
    label = Slack-2.6.35.9
    read-only
  • # lilo -v
  • # reboot

The above instructions should be useful for every GNU/Linux distribution.

Here is some more detailed information:

http://alien.slackbook.org/dokuwiki/doku.php?id=linux:kernelbuilding&s[]=kernel

and here is another useful link:

http://www.dawoodfall.net/index.php/kernel-compilation

Advertisements

2 thoughts on “How to compile the Linux kernel

  1. Pingback: Pinnacle PCTV Hybrid Pro Stick (330e) on Slackware 13.1 « Giovanni’s Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s