[plug] Compiling a driver

Peter Wright pete at cygnus.uwa.edu.au
Fri Jun 2 14:06:12 WST 2000


On Fri, Jun 02, 2000 at 01:33:21PM +0800, Earnshaw, Mike wrote:
> List,
> 
> Revisiting my post from yesterday viz. DPT Raid Controller. The
> source on their web site is for kernel 2.2.12-20. When you examine
> the file it contains 109diff, which (to a non programmer like me)
> just looks like c gibberish.

What is the _file_ called? What do you mean when you say it "contains"
109diff?

> Never having done this, would it "hurt" if I complied it under
> 2.2.14-05 (RH6.2).

Assuming you have compiled your kernel with module-version-information
(can't remember the exact flag, sorry) turned on, it should be fine.

> From what little I have read I would use gcc. 

Yep.

The source for a Linux kernel module should come with a makefile
though - you should just be able to type "make" and it will build the
module.

> Assuming I have then compiled the driver correctly, there is no
> "setup" or "install" like win$low, so how do you go about installing
> the driver?

You should end up with a .o file - say dptraid.o - then you just
insmod it.

# insmod dptraid.o

Possibly you might need the -f flag, eg.

# insmod -f dptraid.o

although you should be able to get away without that.

Then if you type 

# lsmod

you should see dptraid in the list of modules installed.

> Sorry for all the questions but I am not game to do it in case I
> break something I can't fix.

You _should_ be okay with it. No guarantees, of course. :)

If you don't want the module anymore, you can remove it from your
running kernel with rmmod:

# rmmod dptraid

> BTW. I Can get the same card working on a RH6.0 box with the driver
> supplied by DPT.

How is this question different from what you're asking above? Are you
just meaning a default RH6.0 box still with the distribution kernel
(which was, from memory, version 2.2.5)?

I honestly don't know, but you could try it and see if it breaks. :) 

> Thanks,
> 
> Mike Earnshaw

Pete.
-- 
http://cygnus.uwa.edu.au/~pete/

--
hundred-and-one symptoms of being an internet addict:
47. You are so familiar with the WWW that you find the search engines useless.




More information about the plug mailing list