Red Hat Installation - How to compile a module for a specific kernel version

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Installation > April 2004 > How to compile a module for a specific kernel version





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to compile a module for a specific kernel version
Markus Baertschi

2004-04-07, 7:36 pm


What is the correct procedure to compile a module in order for it to
work with a kernel on a RedHat installation CD or diskette ?

My situation is the following:
- I want to install RedHat AS 2.1 e.34 on an IBM HS20 Blade.
- There are instructions on the IBM & RedHat Website, but these
are for release e.24 only.

With reverse engineering and googling I've found how to package the
drivers into a modules.cgz file onto a diskette. On a separate machine I
can compile the module I need (megaide.o) using the correct kernel tree
(2.4.9-e34). I can correctly compile the module and package it onto the
diskette. When booting from the install CD it is correctly recognized
and the kernel attempts to load the module. But it the fails saying that
the module is compiled for the '2.4.9-e34custom' kernel instead of the
'2.4.9-e34BOOT' kernel I'm booting from.

How can I specify this when building the module ?

Markus
Jason Tang

2004-04-08, 1:46 am

Markus Baertschi wrote:
>
> What is the correct procedure to compile a module in order for it to
> work with a kernel on a RedHat installation CD or diskette ?
>
> My situation is the following:
> - I want to install RedHat AS 2.1 e.34 on an IBM HS20 Blade.
> - There are instructions on the IBM & RedHat Website, but these
> are for release e.24 only.
>
> With reverse engineering and googling I've found how to package the
> drivers into a modules.cgz file onto a diskette. On a separate machine I
> can compile the module I need (megaide.o) using the correct kernel tree
> (2.4.9-e34). I can correctly compile the module and package it onto the
> diskette. When booting from the install CD it is correctly recognized
> and the kernel attempts to load the module. But it the fails saying that
> the module is compiled for the '2.4.9-e34custom' kernel instead of the
> '2.4.9-e34BOOT' kernel I'm booting from.
>
> How can I specify this when building the module ?
>
> Markus


RedHat systems include a /usr/src/linux-2.4/configs directory containing
various default kernel configurations. Use 'make menuconfig' or 'make
xconfig' to load the *BOOT config, then Save&Exit. 'make dep', then
compile your module and save it to the kernel-*BOOT directory in your
modules.cgz. When the installer searches your driver disk, it will find
the module its looking for.

More complete instructions can be found on my website:
http://members.rogers.com/sith.warrior/
It deals mostly with the FastTrak raid drivers, but the build
instructions can be applied to pretty much any driver.

hth,
jt

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com