You are not logged in.

#1 2006-01-31 00:36:59

tom8658
Member
Registered: 2006-01-27
Posts: 18

Loading Kernel Modules in 2.6.15

I'm trying to install drivers for an Areca RAID card. The company has source drivers as well as binaries for SuSE, RedHat, etc. I downloaded the Areca source drivers and the vanilla kernel sources and patched the Kconfig and Makefile in drivers/scsi/ to generate a kernel module, arcmsr.o built against a 2.6.15 kernel.

When i try

modprobe ./arcmsr.o

it fails with

FATAL: module ./arcmsr.o not found

.

What do I do now? Do I need to run a utility to index the new module for modprobe?

I built the whole set of vanilla kernel modules (but not the kernel itself) with the arch kernel26 config file, should I

make modules_install

to install the whole set and then recreate /lib/modules/linux-2.6.15-ARCH as a symlink to the new module repository?

Or should I write a pkgbuild (or edit the kernel26 pkgbuild) to install the ARC1210 patches and rebuild the kernel instead of doing it by hand? A pkgbuild is less than ideal (though I have one that seems to work), as I would also like to be able to do

pacman -Syu

and upgrade the kernel. I'm afraid that if I tell pacman not to update the kernel, I'll forget and run 2.6.15 forever big_smile.

Offline

#2 2006-01-31 02:02:22

mtrivs
Member
From: Syracuse, NY
Registered: 2005-12-26
Posts: 183

Re: Loading Kernel Modules in 2.6.15

usually when you run modprobe you dont include the file extensions (*.o or *.ko) try this:

# modprobe arcmsr

~HP ZV6000 Series CTO~
-AMD Athlon 64 3200+ 2.0GHz
-1.5GB RAM
-128MB ATI Mobility Radeon X200m
-80GB 5400RPM HD
[img]http://imagegen.last.fm/scarface/recenttracks/mtrivs.gif[/img]

Offline

#3 2006-01-31 02:39:29

tom8658
Member
Registered: 2006-01-27
Posts: 18

Re: Loading Kernel Modules in 2.6.15

mtrivs wrote:

usually when you run modprobe you dont include the file extensions (*.o or *.ko) try this:

# modprobe arcmsr

Now that I think of it, you're right. Sometimes I can be a real idiot. I'll try this as soon as I get back to my server. Can I put this module anywhere, or does it have to go in /lib/modules/linux-2.6.15-ARCH where it will get overwritten every time I upgrade the kernel?

Offline

#4 2006-01-31 03:17:22

mtrivs
Member
From: Syracuse, NY
Registered: 2005-12-26
Posts: 183

Re: Loading Kernel Modules in 2.6.15

well, for that i am unsure, but one way you can find out where all your modules are is running this:

# locate -u
# locate *.o

and that will show you all of the files with the .o file extension.  From ther you may or may not be able to copy the module to that dir and then i believe you have to run a command to update your module dependancies file, but i dont really know.......

Hope this can help you out somewhat!


~HP ZV6000 Series CTO~
-AMD Athlon 64 3200+ 2.0GHz
-1.5GB RAM
-128MB ATI Mobility Radeon X200m
-80GB 5400RPM HD
[img]http://imagegen.last.fm/scarface/recenttracks/mtrivs.gif[/img]

Offline

#5 2006-01-31 03:31:43

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Loading Kernel Modules in 2.6.15

mtrivs wrote:

and that will show you all of the files with the .o file extension.  From ther you may or may not be able to copy the module to that dir

I'd suggest a symlink, but I don't know how much more successful it would be.

[code]
and then i believe you have to run a command to update your module dependancies file, but i dont really know.......

perhaps depmod?

Dusty

Offline

#6 2006-01-31 07:04:45

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Loading Kernel Modules in 2.6.15

Kernel modules for 2.6 have a .ko NOT .o filename.

Please ensure that you use the included makefiles and installation options included with the driver and run depmod -a after installing.

If the driver is precompiled and has no make options, then it will *not* work under any circumstances.

What driver is it? It would help us identify your problem much more easily.

iphitus

Offline

#7 2006-01-31 07:43:02

tom8658
Member
Registered: 2006-01-27
Posts: 18

Re: Loading Kernel Modules in 2.6.15

iphitus wrote:

Kernel modules for 2.6 have a .ko NOT .o filename.

The included makefile is written for a 2.6 kernel and produces a .o, and Gentoo used to mix the two, although Gentoo is hardly the golden standard.

Please ensure that you use the included makefiles and installation options included with the driver and run depmod -a after installing.

Both the vanilla kernel and the pkgbuild include the source and makefile unchanged in the correct place. Both are patched correctly as per the included readme.

If the driver is precompiled and has no make options, then it will *not* work under any circumstances.

I don't think I can precompile it, since it depends on about a dozen headers from include/scsi, which all have compile-time macros set by the kernel's makefiles. Even if I could track down every #ifdef and set the macro by hand, I wouldn't want to.

What driver is it? It would help us identify your problem much more easily.

Areca ARC1210 Source driver. Before you spend any time on this particular module, I should reiterate that I don't think there's anything wrong with the module itself, I was just looking for a minimum effort method to install the module, preferably without a custom kernel. I don't see this as a very likely option anymore, so more than likely I will use the pkgbuild I wrote for the purpose.

Offline

#8 2006-01-31 07:49:12

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,837

Re: Loading Kernel Modules in 2.6.15

tom8658 wrote:

does it have to go in /lib/modules/linux-2.6.15-ARCH where it will get overwritten every time I upgrade the kernel?

If you're using pacman to manage your kernel, it won't get overwritten, as it will not be  included on the filelist for the kernel package. pacman will simply ignore it, and it will remain on your system.

Of course, you will need to recompile it for any substantive kernel upgrade.

Offline

#9 2006-01-31 08:17:27

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Loading Kernel Modules in 2.6.15

You didnt read the readme.

This driver has to be built *in tree*, in the kernel tree for it to work.

Read readme.txt and follow the instructions there. If you wish to use Arch's PKGBUILD, you will need to make heavy modifications to add this in. I suggest you just compile one outside pacman.

iphitus

Offline

#10 2006-01-31 14:25:03

tom8658
Member
Registered: 2006-01-27
Posts: 18

Re: Loading Kernel Modules in 2.6.15

iphitus wrote:

This driver has to be built *in tree*, in the kernel tree for it to work.
iphitus

I'm not sure I know what you mean. I followed the instructions in the readme and produced an arcmsr.o module in drivers/scsi/arcmsr when I did make modules. The only thing I didn't do was actually use the new kernel. Is that what I need to do? If so, that answers my original question, I was just hoping there was an easier way.

Offline

Board footer

Powered by FluxBB