kif - kernel installation facility


Automate the building and installation of Linux kernels. Manage the necessary configuration files for each installed Linux kernel.

kif [options] [startingPhase [endingPhase]]


kif and it's associated perl modules provide a framework for building and installing Linux kernels. It is extensible and can be made to handle any combination of architectures and boot loaders. Version 1.00 handles:

  • ppc (Macintosh), BootX

  • alpha, aboot

  • ix86, GRUB and LILO

any and all extensions made for other processor architectures and boot loaders will be greatfully included.

The kernel installation process is broken into "phases". These phases define what kif is to do. Be default kif begins at the first phase and goes to the last. kif may be instructed to begin and end at any desired phase. The phases and their purposes are:

  • clean - [default starting phase if no starting phase is specified] from the build directory (by default, the current directory) save a copy of .config and include/linux/autoconf.h, clean the directory (distclean is used), and restore .config and include/linux/autoconf.h. .config and autoconf.h may be missing although if you haven't generated a valid .config file for the current build, then do so before continuing. The timestamps of all files are maintained to preserve any time dependent tests done by the kernel build itself.

    If there is no valid autoconf.h or the .config file is newer, then the autoconf.h file is regenerated using "make oldconfig".

  • dependencies - using the current .config and autoconf.h rebuild the dependencies in the build directory. This is done via "make dep".

  • kernel - compile and link the kernel. This is done via the appropriate architecture dependent make command, e.g., make bzImage for ix86 architectures.

  • modules - compile and link the specified modules. This is done via "make modules".

  • modules_install - install the modules in the appropriate directory beneath /lib/modules. Remember to modify buildDirectory/Makefile to include the appropriate version information to get the modules put in the "right" place.

  • bootloader - modify the bootloader configuration file(s) to make the new kernel the default bootable image. This is also the first place in which the current system gets altered, e.g., an ix86 architecture using lilo will have it's boot block modified at this point. The original bootloader configuration files are saved with an extension of .old.

  • movefiles - .config, autoconf.h,, vmlinux, and any architecture dependent files are copied to the appropriate place(s) and tagged with the current release information to make the unique and identifiable.

  • links - all necessary symbolic links are constructed.

  • depmod - The necessary system module dependency information is build using the appropriate for the new kernel.

  • initrd - [default ending phase if no ending phase is specified] Generate the initrd file for this kernel image if an initrd file for this kernel already exists or the bootloader configuration file defines an initrd file for this image.


-a architecture | --architecture=architecture

By default the current architecture. Used to select the appropriate perl modules for building on the specified architecture. The value of this option may be any valid Linux architecture as returned by "uname -a". Not all valid architectures may be supported at any given time.

-d buildDirectory | --directory=buildDirectory

The path to the directory containing the source for the Linux kernel and modules. If omitted it defaults to the current working directory.

-h | --help

Produce this pod.


The path to the file into which the output of kif is to be written.

Phase Suppression Options - are of the form noPhaseName where PhaseName is any of the valid phases. Inclusion of one of these options causes the specified phase of the build process to be skipped if it would normally be executed.

Run kif but do not execute any commands. This is mostly useful in conjunction with the verbose option, below.

-v | --verbose

These may be used more than once to increase the verbosity of the output.

-V | --version

Print the current version number.


All files saved or written by kif will be "tagged" with the version information extracted from the make file present in the build directory. It is the responsibility of the user to modify the make file as appropriate to allow kif to work sanely. The collection of information defining the current release of the kernel is called the "releaseTag".

Not all of the following files exist on each system. Not all systems use /boot as the place to store kernel images.


The aboot configuration file used to boot this kernel.


The autoconf.h generated when this kernel was built.


The .config file used to generate autoconf.h when this kernel was built.


The grub configuration file used to boot this kernel.


The initrd file genereated for this kernel.


The system map for this kernel.


Symbolic link to the appropriate default uncompressed Linux kernel.


The uncompressed Linux kernel image.


Symbolic link to the appropriate default compressed Linux kernel.


The compressed Linux kernel image.


The lilo configuration file used to boot this kernel.


The modules associated with the Linux kernel.

Getting kif

The CVS sources and release kits are available from SourceForge at:

The latest released version is also available from my PAUSE directory at:

The latest development version is available from my website at:


Dick Munroe ( I'm looking for work (contract or permanent). I do a lot more than just hack Perl. Take a look at my:

Resume: Skills: CV:

for the gory details. If you see a match, drop me a not and we'll see what we can work out.