.\" Hey, Emacs! This is an -*- nroff -*- source file. .\" Copyright (c) 1997 Manoj Srivastava .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual; if not, write to the Free .\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, .\" USA. .\" .\" $Id: kernel-package.5,v 1.6 2001/12/21 21:46:29 srivasta Exp $ .\" .TH KERNEL\-PACKAGE 5 "May 25 1999" "Debian" "Debian GNU/Linux manual" .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection .\" other parms are allowed: see man(7), man(1) .SH NAME kernel\-package \- system for creating kernel related packages .SH "DESCRIPTION" The .B kernel\-package package grew out of desire to automate the routine steps required to compile and install a custom kernel. If you are looking for instructions on how to use .BR kernel\-package , please have a look at the manual .BR make\-kpkg (1). Configuring instructions are to be found in .BR kernel\-pkg.conf (5). .SH "Advantages of using kernel\-package" .RS .TP .B i) Convenience. I used to compile kernels manually, and it involved a series of steps to be taken in order; kernel\-package was written to take all the required steps (it has grown beyond that now, but essentially, that is what it does). This is especially important to novices: .B make\-kpkg takes all the steps required to compile a kernel, and installation of kernels is a snap. .TP .B ii) Multiple images support It allows you to keep multiple version of kernel images on your machine with no fuss. .TP .B iii) Multiple Flavors of the same kernel version It has a facility for you to keep multiple flavors of the same kernel version on your machine (you could have a stable 2.0.36 version, and a 2.0.36 version patched with the latest drivers, and not worry about contaminating the modules in .IR /lib/modules ). .TP .B iv) Built in defaults It knows that some architectures do not have vmlinuz (using vmlinux instead), and other use zImage rather than bzImage, and calls the appropriate target, and takes care of moving the correct file into place. .TP .B v) Module hooks Several other kernel module packages are hooked into .B kernel\-package, so one can seamlessly compile, say, .B pcmcia modules at the same time as one compiles a kernel, and be assured that the modules so compiled are compatible. .TP .B vi) dpkg support It enables you to use the package management system to keep track of the kernels created. Using make\-kpkg creates a .deb file, and dpkg can track it for you. This facilitates the task of other packages that depend on the kernel packages. .TP .B vii) Configuration tracking It keeps track of the configuration file for each kernel image in .IR /boot , which is part of the image package, and hence is the kernel image and the configuration file are always together. .TP .B viii) Multiple config files It allows you to specify a directory with config files, with separate config files for each sub\-architecture (even allows for different config files for i386, i486, etc). It is really neat for people who need to compile kernels for a variety of sub architectures. .TP .B ix) Auxiliary kernel .deb packages It allows one to create a package with the headers, or the sources, also as a deb file, and enables the package management system to keep track of those (and there are packages that depend on the package management system being aware of these packages). .TP .B x) Maintainer script services Since the kernel image package is a full fledged Debian package, it comes with maintainer scripts, which allow the user to add hook scripts to run when the package status changes. .TP .B xi) Sub architecture support There is support for the multitudinous sub architectures that have blossomed under the umbrella of the m68k and power\-PC architectures. .TP .B xii) Portable kernel images Allows one to compile a kernel for another computer, for example using a fast machine to compile the kernel for installation on a slower machine. This is really nice since the modules are all included in the .deb; and one does not have to deal with modules manually. .TP .B xiii) runtime hooks The preinst, postinst, prerm and the postrm scripts allow the local admin on the installation machine to add a script into runtime hooks; this can allow, amongst other things, grub users to add and remove kernel image stanzas from the grub menu (example scripts to do this are in the package). There are directories under .I /etc/kernel where related packages may drop off scripts that will be run by the maintainer scripts of the packages created by kernel package. Before running these scripts, the environment variable .B KERNEL_PACKAGE_VERSION shall be set to the version of the kernel\-package that created the package. .TP .B xiv) Append descriptive bits to the kernel version One can append to the kernel version on the command line, or by setting an environment variable. So if your kernel is called kernel\-image\-2.4.1John.Home; it is unlikely to be overridden by the official 2.4.1 kernel, since they are not the same version. .RE .SH "Disadvantages of using make\-kpkg" .TP .B i) Automation. This is a cookie cutter approach to compiling kernels, and there are people who like being close to the bare metal. .TP .B ii) Non traditional This is not how it is done in the non\-Debian world. This flouts tradition. (It has been pointed out, though, that this is fast becoming Debian tradition). .TP .B iii) Needs superuser It forces you to use .B fakeroot or .B sudo or .B super or be root to create a kernel image .deb file (this is not as bad as it used to be before .BR fakeroot ). .RE .SH FILES .TP .I /etc/kernel\-pkg.conf .TP .I /etc/kernel\-img.conf .SH "SEE ALSO" .BR make (1), .BR make\-kpkg (1), .B The GNU Make manual .SH BUGS There are no bugs. Any resemblance thereof is delirium. Really. .SH AUTHOR This manual page was written by Manoj Srivastava , for the Debian GNU/Linux system.