HomeBanner

Kernel Compiling

Which Patches

Where can I see which patches to apply, to SuSEify my brand new kernel downloaded from kernel.org ?

Try looking on the ftp site in the people directory...look in mantel. You should find a complete list of patches....or at least he used to keep them there.

How to compile a module for the SuSE kernel ?

Before you compile your module you must prepare the sources, so they reflect the running kernel However, a lot of information can be found in /usr/src/linux/Documentation

  1. cd /usr/src/linux

    self explanatory :)

  2. make mrproper

    Cleans out the source tree, removing bits from previous compiles that may be in there. Also removes old config files.

  3. make cloneconfig

    This is a SuSE hack, as far as I'm aware. This reads the configuration from the running kernel, using the dynamic file /proc/config.gz, and uses that to create an identical configuration for the sources. This ensures that you can compile a kernel identical to the one SuSE supplies. Most people use that as a starting point for experimenting with kernel options.

  4. make dep

    Standard kernel compilation command. It creates dependency files which determine the order in which things are to be compiled. It also creates various header files with information from the configuration.

  5. touch /usr/src/linux/include/linux/modversions.h

    I'm not actually sure if this is necessary. The SuSE kernels don't use module versioning so that header file is never created by "make dep". But a lot of compiles, notably the nvidia graphics driver, fail if that file isn't present.

    The command creates an empty file of that name, which seems to be all that's needed. As I say, I'm not sure about this one, but it's worked for me so far.

  6. After that you can compile yor module, and it will fit nicely into the running kernel


Updated: Tue, 03 Feb 2004
Valid CSS!Valid HTML 4.01!