home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / src / linux-headers-2.6.17-6 / debian / docs / Rationale < prev    next >
Encoding:
Text File  |  2005-06-08  |  5.3 KB  |  95 lines

  1.             Advantages of using make-kpkg
  2.                 ---------- -- ----- ---------
  3.  
  4.     I have been asked several times about the advantages of using
  5.  the kernel-package package over the traditional Linux way of hand
  6.  compiling kernels, and I have come up with this list. This is off the
  7.  top of my head, I'm sure to have missed points yet. Any additions
  8.  welcomed.
  9.  
  10.      i) Convenience. I used to compile kernels manually, and it
  11.         involved a series of steps to be taken in order;
  12.         kernel-package was written to take all the required steps (it
  13.         has grown beyond that now, but essentially, that is what it
  14.         does). This is especially important to novices: make-kpkg
  15.         takes all the steps required to compile a kernel, and
  16.         installation of kernels is a snap.
  17.     ii) It allows you to keep multiple version of kernel images on
  18.         your machine with no fuss.
  19.    iii) It has a facility for you to keep multiple flavours of the
  20.         same kernel version on your machine (you could have a stable
  21.         2.0.33 version, and a 2.0.33 version patched with the latest
  22.         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.         and calls the appropriate target, and takes care of moving the
  27.         correct file into place.
  28.      v) Several other kernel module packages are hooked into
  29.         kernel-package, so one can seamlessly compile, say, pcmcia
  30.         modules at the same time as one compiles a kernel, and be
  31.         assured that the modules so compiled are compatible.
  32.     vi) It enables you to use the package management system to keep
  33.         track of the kernels created. Using make-kpkg creates a .deb
  34.         file, and dpkg can track it for you. This facilitates the task
  35.         of other packages that depend on the kernel packages.
  36.    vii) It keeps track of the configuration file for each kernel image
  37.         in /boot, which is part of the image package, and hence the
  38.         kernel image and the configuration file are always together.
  39.   viii) It allows you to specify a directory with config files, with
  40.         separate config files for each subarchitecture (even allows
  41.         for different config files for i386, i486, etc). It is really
  42.         neat for people who need to compile kernels for a variety of
  43.         sub architectures.
  44.     ix) It allows to create a package with the headers, or the
  45.         sources, also as a deb file, and enables the package
  46.         management system to keep track of those (and there are
  47.         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.         package, it comes with maintainer scripts, which take care of
  51.         details like offering to make a boot disk, manipulating
  52.         symbolic links in / so that you can make boot loader scripts
  53.         static (just refer to the symbolic links, rather than the real
  54.         image files; the names of the symbolic links do not change,
  55.         but the kernel image file names change with the version).
  56.     xi) There is support for the multitudinous subarchitectures that
  57.         have blossomed under the umbrella of the m68k and powerpc
  58.         architectures.
  59.    xii) There is support there for optionally applying patches to the
  60.         kernel provided as a kernel-patch .deb file, and building a
  61.         patched kernel auto-magically, and still retain an UN-patched
  62.         kernel source tree.
  63.   xiii) Allows one to compile a kernel for another computer, for
  64.         example using a fast machine to compile the kernel for
  65.     installation on a slower machine. This is really nice since
  66.     the modules are all included in the .deb; and one does not
  67.     have to deal with modules manually.
  68.    xiv) The postinst looks at a configuration file on the installation
  69.         machine (as opposed to the machine that the image was compiled
  70.         on), and allows the local admin to decide on issues of
  71.         symbolic links, and whether the boot loader stuff must be
  72.         run, and whether one wants to create a boot floppy or not. 
  73.     xv) The postinst and the postrm scripts allow the local admin on
  74.         the installation machine to add a script into runtime hooks;
  75.         this can allow, amongst other things, grub users to add and
  76.         remove kernel image stanzas from the grub menu (example
  77.         scripts to do this are in the package).
  78.    xvi) One can append to the kernel version on the command line, or
  79.         by setting an environment variable. So if your kernel is
  80.         called kernel-image-2.4.1John.Home; it is unlikely to be
  81.         overridden by the official 2.4.1 kernel, since they are not the
  82.         same version.
  83.  
  84.            Disadvantages of using make-kpkg
  85.            ------------- -- ----- ---------
  86.  
  87.       i) This is a cookie cutter approach to compiling kernels, and
  88.          there are people who like being close to the bare metal.
  89.      ii) This is not how it is done in the non-Debian world. This
  90.          flouts tradition. (It has been pointed out, though, that this
  91.          is fast becoming Debian tradition)
  92.     iii) It forces you to use fakeroot or sudo or super or be root to
  93.          create a kernel image .deb file (this is not as bad as it
  94.          used to be before fakeroot).
  95.