[plug] Compiling a driver
Earnshaw, Mike
earnshawm at wa.switch.aust.com
Fri Jun 2 15:28:45 WST 2000
Peter / List,
1. The file is called 109diff
2. Copied the file to a spare 6.2 box, installed with everything
3. As root : gcc -f 109diff ---> the following results:
/usr/bin/ld:109diff:1: file format not recognised:
treating as linear script
/usr/bin/ld:109diff:1: parse error
collect2: ld returned 1 exit status
No idea what it means!
Any pointers please?
Thanks
> -----Original Message-----
> From: Peter Wright [mailto:pete at cygnus.uwa.edu.au]
> Sent: Friday, June 02, 2000 1:56 PM
> To: plug at plug.linux.org.au
> Subject: Re: [plug] Compiling a driver
>
>
> 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