[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: build scsi kernel module for other kernel



Arjan van de Ven wrote:
On Thu, 2006-03-02 at 11:02 -0500, FM wrote:
Hello,
I'm using VMWARE esx with RHEL4 as a guest

I have buslogic kernel module for U2 kernel but not for the the latest
security kernel update.

I also have the buslogic source (provided by VMWARE).

Is it possible to build the scsi kernel for the 2.6.9-22.0.2 (I
installed the update but I cannot reboot :) ) from the U2default kernel ?


put the source in it's own directory
make a Makefile that looks like


obj-m += BusLogic.c

(or whatever the .c file is called)

and then do
make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` modules

and .. voila
(you do need the kernel-devel package installed for this)

Arjan -

Shouldn't that be:

make -C /lib/modules/[target kernel]/build SUBDIRS=`pwd` modules

where [target kernel] is the version for which you are building the kernel module?

For instance:

make -C /lib/modules/2.6.9-22.0.2.EL/build SUBDIRS=`pwd` modules

The problem is that when you install RHEL4 U2 under ESX 2.5.2, you have use a driver diskette from VMWare. The kernel module is installed under /lib/modules/2.6.9-22.EL, and the initial ramdisk is created correctly. When you run up2date, you go to kernel 2.6.9-22.0.2.EL, and you need to create the BusLogic.ko file under /lib/modules/2.6.9-22.0.2.EL. You then have to create the correct initrd.img file. Unfortunately, if you try to boot into 2.6.9-22.0.2.EL (or any other kernel version than the one you originally installed), you get a kernel panic b/c the root filesystem can't be mounted. So you need to create a kernel module for 2.6.9-22.0.2.EL while you are booted into 2.6.9-22.EL.

Make sense?

Thanks!
--
Thomas Cameron, RHCE, CNE, MCSE, MCT
Enterprise Solutions Architect
Red Hat
512.241.0774 office 512.585.5631 cell 512.857.1345 fax


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]