Linux Step By Steps

MODULE VERSIONING

From: "Jeffrey Hawkins" <rtswguru@home.com>

From: "Joel Hammer" <jlh@cc846558-a.twsn1.md.home.com>

> On Sat, Sep 09, 2000 at 05:45:36PM -0700, Net Llama wrote:
> > This is actually easier to deal with than you realize. The
> > /lib/modules/<kernel_version> directory gets its name from
> > /usr/src/<kernel_name> directory. Thus, name
> /usr/src/2.2.14-new and
> > you'll get /lib/modules/2.2.14-new . Problem solved!
> >
>
> Hmmm....
> So, just mv 2.2.14 to 2.2.14.new and rebuild in the new
> directory?
> Won't that break other stuff?
> Joel
>
Actually, the statement about the Module Directory Tree getting it's name from the Name of the KERNEL Directory is incorrect. The Name is formulated by the Kernel Version defined in the Kernel Make File.

What you want to do is modify the Kernel Make File, "/usr/src/linux/Makefile", and change the "EXTRAVERSION" variable. This will formulate a unique KERNEL Version for the new Build. If wokring with the same major Kernel Version, ie. 2.2.14, and not creating a new Kernel Source
Directory Tree, make sure you preserve the System.map

File -- with the Caldera default configuration, the "/boot/System.map" is a symbolic link to the System.map File in the Kernel Source Directory -- What I do is copy the System.map from the Kernel
Tree to the /boot directory with a unique identifier and setup the Symbolic Link to the appropriate map file in /boot. For example, for 2.2.14, I copied the /usr/src/linux-2.2.14/System.map to /boot/System.map-2.2.14, and setup a Symbolic Link between this new file and /boot/System.map.

With respect to the "/lib/modules/default", the Directory which typically holds Modules created by 3rd Party Packages and/or Drivers, and are not updated during the Kernel Build, the Modules contained in this Directory will give you problems when trying to run both 2.2.x and 2.4.x Kernels (the current 2.2.14 Modules are incompatible with 2.4). To resolve this you will have to move the Modules, under the appropriate

Kernel Modules Directory Tree. You will also have to modify the Packages Make Files to point to the appropriate Kernel Modules Directory (if you ever decide to rebuild the Packages).