Search This Blog

Tuesday, August 6, 2013

Debian 6.x.x - Compile linux kernel

1. Read this manual before begining of compiling:
http://www.debian.org/releases/stable/i386/ch08s06.html.en

2. Update system:
[user@linux]~$ sudo apt-get update

3. Download and install packages:
[user@linux]~$ sudo apt-get install build-essential fakeroot
kernel-package libncurses5-dev zlib1g-dev

4. Download linux kernel:
[user@linux]~$ cd /usr/src
[user@linux]:/usr/src$ wget
https://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.5.tar.bz2

5. Unarchive linux kernel tarball:
[user@linux];/usr/src$ tar xvjf linux-2.6.32.5.tar.bz2

6. The hardest step to configure your linux kernel:
[user@linux]:/usr/src$ cd linux-2.6.32.5
[user@linux]:/usr/src/linux-2.6.32.5$ su
Password:
[root@linux]:/usr/src/linux-2.6.32.5# make menuconfig

7. Clean up cache:
[root@linux]:/usr/src/linux-2.6.32.5# make-kpkg clean

8. You can compile linux kernel, and make deb package now:
[root@linux]:/usr/src/linux-2.6.32.5# fakeroot make-kpkg --initrd
--revision=custom.1.0 kernel_image

9. Install linux kernel:
[root@linux]:/usr/src/linux-2.6.32.5# dpkg -i
../linux-image-2.6.32-subarchitecture_custom.1.0_i386.deb

10. Reboot system:
[root@linux]:/usr/src/linux-2.6.32.5# reboot

No comments: