| 1 |
.\" Hey, Emacs! This is an -*- nroff -*- source file.
|
| 2 |
.\" Copyright (c) 1997 Manoj Srivastava <srivasta@debian.org>
|
| 3 |
.\"
|
| 4 |
.\" This is free documentation; you can redistribute it and/or
|
| 5 |
.\" modify it under the terms of the GNU General Public License as
|
| 6 |
.\" published by the Free Software Foundation; either version 2 of
|
| 7 |
.\" the License, or (at your option) any later version.
|
| 8 |
.\"
|
| 9 |
.\" The GNU General Public License's references to "object code"
|
| 10 |
.\" and "executables" are to be interpreted as the output of any
|
| 11 |
.\" document formatting or typesetting system, including
|
| 12 |
.\" intermediate and printed output.
|
| 13 |
.\"
|
| 14 |
.\" This manual is distributed in the hope that it will be useful,
|
| 15 |
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 16 |
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 17 |
.\" GNU General Public License for more details.
|
| 18 |
.\"
|
| 19 |
.\" You should have received a copy of the GNU General Public
|
| 20 |
.\" License along with this manual; if not, write to the Free
|
| 21 |
.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
|
| 22 |
.\" USA.
|
| 23 |
.\"
|
| 24 |
.\" $Id: kernel-package.5,v 1.6 2001/12/21 21:46:29 srivasta Exp $
|
| 25 |
.\"
|
| 26 |
.TH KERNEL\-PACKAGE 5 "May 25 1999" "Debian" "Debian GNU/Linux manual"
|
| 27 |
.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
|
| 28 |
.\" other parms are allowed: see man(7), man(1)
|
| 29 |
.SH NAME
|
| 30 |
kernel\-package \- A system for creating kernel related packages
|
| 31 |
.SH "DESCRIPTION"
|
| 32 |
The
|
| 33 |
.B kernel\-package
|
| 34 |
package grew out of desire to automate the routine steps required to
|
| 35 |
compile and install a custom kernel. If you are looking for
|
| 36 |
instructions on how to use
|
| 37 |
.B kernel\-package,
|
| 38 |
please have a look at the manual
|
| 39 |
.B make\-kpkg (1).
|
| 40 |
Configuring instructions are to be found in
|
| 41 |
.B kernel\-pkg.conf(5).
|
| 42 |
.SH "Advantages of using kernel\-package"
|
| 43 |
.RS
|
| 44 |
.TP
|
| 45 |
.B i) Convenience.
|
| 46 |
I used to compile kernels manually, and it involved a series of steps
|
| 47 |
to be taken in order; kernel\-package was written to take all the
|
| 48 |
required steps (it has grown beyond that now, but essentially, that is
|
| 49 |
what it does). This is especially important to novices:
|
| 50 |
.B make\-kpkg
|
| 51 |
takes all the steps required to compile a kernel, and installation of
|
| 52 |
kernels is a snap.
|
| 53 |
.TP
|
| 54 |
.B ii) Multiple images support
|
| 55 |
It allows you to keep multiple version of kernel images on your
|
| 56 |
machine with no fuss.
|
| 57 |
.TP
|
| 58 |
.B iii) Multiple Flavours of the same kernel version
|
| 59 |
It has a facility for you to keep multiple flavours of the
|
| 60 |
same kernel version on your machine (you could have a stable
|
| 61 |
2.0.36 version, and a 2.0.36 version patched with the latest
|
| 62 |
drivers, and not worry about contaminating the modules in
|
| 63 |
.I /lib/modules).
|
| 64 |
.TP
|
| 65 |
.B iv) Built in defaults
|
| 66 |
It knows that some architectures do not have vmlinuz (using
|
| 67 |
vmlinux instead), and other use zImage rather than bzImage,
|
| 68 |
and calls the appropriate target, and takes care of moving the
|
| 69 |
correct file into place.
|
| 70 |
.TP
|
| 71 |
.B v) Module hooks
|
| 72 |
Several other kernel module packages are hooked into
|
| 73 |
.B kernel\-package,
|
| 74 |
so one can seamlessly compile, say,
|
| 75 |
.B pcmcia
|
| 76 |
modules at the same time as one compiles a kernel, and be assured that
|
| 77 |
the modules so compiled are compatible.
|
| 78 |
.TP
|
| 79 |
.B vi) dpkg support
|
| 80 |
It enables you to use the package management system to keep track of
|
| 81 |
the kernels created. Using make\-kpkg creates a .deb file, and dpkg can
|
| 82 |
track it for you. This facilitates the task of other packages that
|
| 83 |
depend on the kernel packages.
|
| 84 |
.TP
|
| 85 |
.B vii) Configuration tracking
|
| 86 |
It keeps track of the configuration file for each kernel image
|
| 87 |
in
|
| 88 |
.I /boot,
|
| 89 |
which is part of the image package, and hence is the kernel image and
|
| 90 |
the configuration file are always together.
|
| 91 |
.TP
|
| 92 |
.B viii) Multiple config files
|
| 93 |
It allows you to specify a directory with config files, with separate
|
| 94 |
config files for each sub\-architecture (even allows for different
|
| 95 |
config files for i386, i486, etc). It is really neat for people who
|
| 96 |
need to compile kernels for a variety of sub architectures.
|
| 97 |
.TP
|
| 98 |
.B ix) Auxiliary kernel .deb packages
|
| 99 |
It allows to create a package with the headers, or the sources, also
|
| 100 |
as a deb file, and enables the package management system to keep track
|
| 101 |
of those (and there are packages that depend on the package management
|
| 102 |
system being aware of these packages).
|
| 103 |
.TP
|
| 104 |
.B x) Maintainer script services
|
| 105 |
Since the kernel image package is a full fledged Debian package, it
|
| 106 |
comes with maintainer scripts, which take care of details like
|
| 107 |
offering to make a boot disk, manipulating symbolic links in / so that
|
| 108 |
you can make boot loader scripts static (just refer to the symbolic
|
| 109 |
links, rather than the real image files; the names of the symbolic
|
| 110 |
links do not change, but the kernel image file names change with the
|
| 111 |
version).
|
| 112 |
.TP
|
| 113 |
.B xi) Sub architecture support
|
| 114 |
There is support for the multitudinous sub architectures that have
|
| 115 |
blossomed under the umbrella of the m68k and power\-PC architectures.
|
| 116 |
.TP
|
| 117 |
.B xii) kernel\-patch support
|
| 118 |
There is support there for optionally applying patches to the kernel
|
| 119 |
provided as a kernel\-patch .deb file, and building a patched kernel
|
| 120 |
auto\-magically, and still retain an UN\-patched kernel source tree.
|
| 121 |
.TP
|
| 122 |
.B xiii) Portable kernel images
|
| 123 |
Allows one to compile a kernel for another computer, for example using
|
| 124 |
a fast machine to compile the kernel for installation on a slower
|
| 125 |
machine. This is really nice since the modules are all included in
|
| 126 |
the .deb; and one does not have to deal with modules manually.
|
| 127 |
.TP
|
| 128 |
.B xiv) Customizations on the target host
|
| 129 |
The postinst looks at a configuration file on the installation machine
|
| 130 |
(as opposed to the machine that the image was compiled on), and allows
|
| 131 |
the local admin to decide on issues of symbolic links, and whether the
|
| 132 |
boot loader stuff must be run, and whether one wants to create a boot
|
| 133 |
floppy or not.
|
| 134 |
.TP
|
| 135 |
.B xv) runtime hooks
|
| 136 |
The postinst and the postrm scripts allow the local admin on the
|
| 137 |
installation machine to add a script into runtime hooks; this can
|
| 138 |
allow, amongst other things, grub users to add and remove kernel image
|
| 139 |
stanzas from the grub menu (example scripts to do this are in the
|
| 140 |
package).
|
| 141 |
.TP
|
| 142 |
.B xvi) Append descriptive bits to the kernel version
|
| 143 |
One can append to the kernel version on the command line, or by
|
| 144 |
setting an environment variable. So if your kernel is called
|
| 145 |
kernel\-image\-2.4.1John.Home; it is unlikely to be overridden by the
|
| 146 |
official 2.4.1 kernel, since they are not the same version.
|
| 147 |
.RE
|
| 148 |
.SH "Disadvantages of using make\-kpkg"
|
| 149 |
.TP
|
| 150 |
.B i) Automation.
|
| 151 |
This is a cookie cutter approach to compiling kernels, and there are
|
| 152 |
people who like being close to the bare metal.
|
| 153 |
.TP
|
| 154 |
.B ii) Non traditional
|
| 155 |
This is not how it is done in the non\-Debian world. This flouts
|
| 156 |
tradition. (It has been pointed out, though, that this is fast
|
| 157 |
becoming Debian tradition).
|
| 158 |
.TP
|
| 159 |
.B iii) Needs superuser
|
| 160 |
It forces you to use
|
| 161 |
.B fakeroot
|
| 162 |
or
|
| 163 |
.B sudo
|
| 164 |
or
|
| 165 |
.B super
|
| 166 |
or be root to create a kernel image .deb file (this is not as bad as
|
| 167 |
it used to be before
|
| 168 |
.B fakeroot)
|
| 169 |
.RE
|
| 170 |
.SH FILES
|
| 171 |
.I /etc/kernel\-pkg.conf.
|
| 172 |
.I /etc/kernel\-img.conf.
|
| 173 |
.SH "SEE ALSO"
|
| 174 |
.BR make\-kpkg (1),
|
| 175 |
.BR make (1),
|
| 176 |
.B The GNU Make manual.
|
| 177 |
.SH BUGS
|
| 178 |
There are no bugs. Any resemblance thereof is delirium. Really.
|
| 179 |
.SH AUTHOR
|
| 180 |
This manual page was written by Manoj Srivastava <srivasta@debian.org>,
|
| 181 |
for the Debian GNU/Linux system.
|