Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Rolling Your Own


Compiling your own Linux kernel may sound like a pretty scary task. Take a deep breath and ``enjoy the experience.'' It is actually not such a big thing to compile your own kernel. And Debian makes it even more straightforward by supplying the kernel-package to leave you with a kernel-image package that you simply install, just as you would any kernel-image package you might get from Debian.

The advantages of compiling your own kernel include being able to tune the kernel to your specific hardware, and ending up with a smaller kernel. You may also need to compile your own kernel if the default kernel does not support some specific hardware you have. The distributed kernels though are becoming modular and it is becoming rare that you would need to compile your own kernel. If you do though, the recipe here should help and the introduction to compiling your own kernel at https://newbiedoc.sourceforge.net/tutorials/kernel-pkg/index-kernel-pkg.htmlshould prove a useful read.

The hardware we review in this book has occasionally required kernel compiles. For example, Bartok (101.6) contains over 1GB of memory but the supplied kernels limit to less than 1GB (NOHIGHMEM). Mint (101.32) had a specific kernel compiled for it with sound support through ALSA, IDE SCSI emulation support for CDRW, and with PPP and IPMASQ support. Velox (101.31) had a kernel compiled with sound support through ALSA, IDE SCSI emulation support for CDRW, and support for dual processors.

Some sample compiles of the kernel are included with specific installations in Section 101. See Section 101.6.5 for an example of compiling kernel 2.4.16 with extra memory support (HIGHMEM) and multiple CPU support (SMP). See Section 101.21.3 for an example of obtaining the linux kernel source (kernel 2.4.19) directly and compiling it the Debian way for Bach (101.21). See Section 101.18.3 for an example of obtaining the linux kernel source (kernel 2.4.19) and patching it with a pre-release (2.4.20-pre11) and compiling it the Debian way for Vivaldi (101.18).

Note that kernel version numbers interact with Debian's package management. By calling your own compiled kernel version 2:kayon.1 it will be a more recent version number than the standard Debian kernel-image package. That is, kernel-image-2.2.14_2:kayon.1_i386 is regarded as being more recent than kernel-image-2.2.14_2.2.14-1_i386. Thus, the packaging system will not try to install a more recent 2.2.14 over your own kernel image. Debian kernel packages always have the version number the same as the kernel version number.


Subsections

Copyright © 1995-2006 [email protected]

 
 
  Published under the terms fo the GNU General Public License Design by Interspire