Rationale 4.74 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
		    Advantages of using make-kpkg
	            ---------- -- ----- ---------

	I have been asked several times about the advantages of using
 the kernel-package package over the traditional Linux way of hand
 compiling kernels, and I have come up with this list. This is off the
 top of my head, I'm sure to have missed points yet. Any additions
 welcomed.

     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: make-kpkg
        takes all the steps required to compile a kernel, and
        installation of kernels is a snap.
    ii) It allows you to keep multiple version of kernel images on
        your machine with no fuss.
   iii) It has a facility for you to keep multiple flavours of the
        same kernel version on your machine (you could have a stable
        2.0.33 version, and a 2.0.33 version patched with the latest
        drivers, and not worry about contaminating the modules in
23
        /lib/modules).
24
    iv) It knows that some architectures do not have vmlinuz (using
25
        vmlinux instead), and others use zImage rather than bzImage,
26 27 28 29 30 31 32 33 34 35
        and calls the appropriate target, and takes care of moving the
        correct file into place.
     v) Several other kernel module packages are hooked into
        kernel-package, so one can seamlessly compile, say, pcmcia
        modules at the same time as one compiles a kernel, and be
        assured that the modules so compiled are compatible.
    vi) 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.
36
   vii) It keeps track of the configuration file for each kernel image
37 38
        in /boot, which is part of the image package, and hence the
        kernel image and the configuration file are always together.
39 40
  viii) It allows you to specify a directory with config files, with
        separate config files for each subarchitecture (even allows
41
        for different config files for i386, i486, etc). It is really
42 43 44
        neat for people who need to compile kernels for a variety of
        sub architectures.
    ix) It allows to create a package with the headers, or the
45 46 47
        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
48
        aware of these packages).
49
     x) Since the kernel image package is a full fledged Debian
50 51 52
        package, it comes with maintainer scripts, which allow the end
        user to add in scripts to affect handling of new kernel
        packages in a most flexible fashion.
53
    xi) There is support for the multitudinous subarchitectures that
54 55 56
        have blossomed under the umbrella of the m68k and powerpc
        architectures.
   xii) There is support there for optionally applying patches to the
57 58
        kernel provided as a kernel-patch .deb file, and building a
        patched kernel auto-magically, and still retain an UN-patched
59
        kernel source tree.
60 61 62 63 64
  xiii) 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.
65
   xiv) The postinst and the postrm scripts allow the local admin on
66
        the installation machine to add a script into runtime hooks;
67 68 69
        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).
70
    xv) One can append to the kernel version on the command line, or
71
        by setting an environment variable. So if your kernel is
72
        called kernel-image-2.4.1John.Home; it is unlikely to be
73
        overridden by the official 2.4.1 kernel, since they are not the
74
        same version.
75 76 77 78 79 80 81 82

		   Disadvantages of using make-kpkg
		   ------------- -- ----- ---------

      i) This is a cookie cutter approach to compiling kernels, and
         there are people who like being close to the bare metal.
     ii) This is not how it is done in the non-Debian world. This
         flouts tradition. (It has been pointed out, though, that this
83 84 85
         is fast becoming Debian tradition)
    iii) It forces you to use fakeroot or sudo or super or be root to
         create a kernel image .deb file (this is not as bad as it
86
         used to be before fakeroot).