LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-26-2004, 10:54 AM   #1
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Rep: Reputation: 30
How to install/insert drivers/modules?


Hi,
I posted a question about how to install a SiS 650 module yesterday, but no one was interested in answering so I thought my question was maybe a bit too specific. Here is the link to that question. Anyways...
Perhaps what I should be asking is how do I insert a module or install a driver?
Right now I have a driver or a module. Which is it called? It's name is sis650.o. It has no documentation what so ever and no other files come with it.... Do I need anything else? Now what do I have to do to insert this module or install this driver into the kernel? I have NO idea how... Is it as simple as to place it in a folder? Or do I have to recompile my kernel?
I'm running on a Debian Sarge system using kernel 2.4.23.
Thanks.
 
Old 01-26-2004, 11:03 AM   #2
kevinatkins
Member
 
Registered: Jan 2004
Location: cheshire, uk
Distribution: Ubuntu Hoary
Posts: 605

Rep: Reputation: 33
hi atheist,

v quick tentative reply here (i'm at work and my boss might walk in at any time..)

kernel modules normally live in the /lib/modules/<kernel-version> directory.

where did you get the sis650.o module from? the .o extension tells me it's already compiled object code, so if it tallies with your kernel, you might get away with sticking the module in said directory, then doing a

$modprobe sis650

.. to load the module.


but i'm thinking possibly not - i think extra input required here from others.
 
Old 01-26-2004, 11:52 AM   #3
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Thanks for your time.
Here is where I got the module from.
When I enter the /lib/modules/2.4.23 directory there 11 files and folders there:
build
kernel
modules.dep
modules.generic_string
modules.ieee1394map
modules.isapnpmap
modules.parportmap
modules.pcimap
modules.pnpbiosmap
modules.usbmap
pcmcia

Anyways. I copy the sis_drv.o-410 module to /lib/modules/2.4.23/ and rename it to sis_drv.o. Then I type "modprobe sis_drv.o" and get this output:
Code:
modprobe: Can't locate module sis_drv.o
Then I type "modprobe sis_drv" and get the same output.
But then I figure why not try "insmod". So I enter insmod sis_drv.o and get this output:
Code:
sis_drv.o: The module you are trying to load (sis_drv.o) is compiled with a gcc version 2 compiler, while the kernel you are running is compiled with a gcc version 3 compiler. This is known to not work.
So... that's it for this module then, eh? There is no way for me to use this module now, right?
 
Old 01-26-2004, 12:21 PM   #4
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
The main commands to insert/remove... modules are the following:
"insmod module.o" allow you to insert module
"rmmod module" allow you to remove module (no extensions)
"modprobe module" allow you to load module and satisfy dependencies (no extensions)
"modinfo module.o" to have info about the module like specific parameters.

To solve your error, install gcc-2.95-3 in /opt for example, and recompile your kernel :
Code:
make CC=/opt/gcc-2.95-3/bin/gcc dep && make CC=/opt/gcc-2.95-3/bin/gcc bzImage && make CC=/opt/gcc-2.95-3/bin/gcc modules && make CC=/opt/gcc-2.95-3/bin/gcc modules_install
Note that kernel developers suggest that kernel have to be compile gcc-2.95 for stability reasons

It would have been faster with modules sources
 
Old 01-26-2004, 04:51 PM   #5
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Thanks alot. That's something I haven't heard before though. I'll do it tomorrow in my 2 hour lunch break since I'm swamped with school work for the next few hours and post the results.
 
Old 01-27-2004, 06:04 AM   #6
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
So, I did what you said. Compiled the kernel with with gcc-2.95. (I think). I used apt-get install gcc-2.95 and installed gcc-2.95 successfully that way. Then when I compiled the kernel I used make CC=/usr/bin/gcc-2.95 dep etc. But when I try modprobing or insmoding the sis module I get the same crappy error message about that I used gcc3 to compile this kernel. (Yes I did edit lilo.conf and actually boot the newly compiled kernel.) Something else worth noting is that at the end of make CC=/usr/bind/gcc-2.95 modules_install I get the following message:
Code:
depmod: ***unresolved symbols in /lib/modules/2.4.23/sis_drv.o
Followed by lots of depmod: blahblah.Does this mean anything to anyone? Thanks for your time.
 
Old 01-27-2004, 07:26 AM   #7
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Yes, for me this means that it's not today that your module will work
seriously, it will be very hard to debug as you don't have module sources... so the only way to make it work is to try to adapt your kernel to the module...
For more help, post the complete error message
 
Old 01-27-2004, 07:54 AM   #8
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
After a quick search, I've probably found a better solution for you: try this driver
 
Old 01-27-2004, 03:46 PM   #9
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Thanks for the amount of time you have all put into this.
As with the Winischhofer driver I already tried it. Said so in my earlier post and forgot to do so again, sorry. It absolutely refused to work so I gave up on it. Then I tried searching for another driver without any luck. So, I started trying Winischhofer driver again as it really seemed to work for people and the amount of time and work that guy is putting into those sis drivers on his site. No luck. I am very new to Linux so I probably learned a few things since I tried his drivers last time so I've decided to give them another go. Even two. Anyways, thanks for your help everyone.
Oh, yeah and this is the whole error message I get when trying to insert the module:
Code:
sis_drv.o: The module you are trying to load (sis_drv.o) is compiled with a gcc version 2 compiler, while the kernel you are running is compiled with a gcc version 3 compiler. This is known to not work.
 
Old 01-27-2004, 05:07 PM   #10
Fascistchicken
Member
 
Registered: Jul 2003
Location: hellifniknow
Distribution: slackware for chickens
Posts: 182

Rep: Reputation: 30
he has several drivers for different versions of debian and gcc. have you tried those?
 
Old 01-29-2004, 03:44 AM   #11
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Sorry for not being able to respond quicker. I've been having some ISP issues.
Anyways, I actually got some proccess with the Winischhofer driver! Althought I don't think I did anything differently. Anyways... Now my problem is that X starts without an error but nothing shows up on the screen. Upon typing startx I get a black screen for a couple of seconds, then it's like it turns itself off(blacker) and then it turns black again.
Now what's with that? Any ideas?
Sorry, I can't really post my XFree86 config but all I get is a black screen and I can't do anything. X boots itself automatically on startup. o_O The computer is still on though. I've tried typing my username and password and the computer seems to respond to that. (The light.) And then I try pressing alt+ctrl+backspace a couple of times without any results. I also try alt+ctrl+fx but nothing happens. I think I'll just try a fresh install tomorrow... but I'd rather not. Any ideas? Kernel parameters I can add on boot to disable x from booting itself?
Thanks.

Edit: Lol, don't mind the black screen part. Turns out I only had to turn on my monitor again. But... everything is like faded out after that.
Btw, how make a backup of XFree85config-4 from my laptop to this computer? (also running Debian) so that I could post my XFree86 config? (They're on a network.)

Last edited by atheist; 01-29-2004 at 03:51 AM.
 
Old 01-29-2004, 07:01 AM   #12
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
To disable X at boot, you have to know which runlevel you start when you boot (file /etc/inittab to know that). Then you go in /etc/rcX.d/ directory (where X is the runlevel you start). And you have to remove symbolic links like S99kdm, S99xdm or S99gdm.
Or another solution is to change the runlevel you start by default. Edit /etc/inittab and change the following line:
Code:
id:5:initdefault:
(in this case 5 is your default runlevel)
A runlevel 1 should be good
 
Old 01-29-2004, 12:54 PM   #13
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Thanks, I was told that I needed to change it to 3 and that didn't work.
 
Old 01-29-2004, 01:30 PM   #14
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Fuck, nice.
I got it working.
The www.winischhofer.net driver.
Turns out I had been loading some modules I shouldn't have in my XFree86config.
Sorry for all the trouble, but I learned a few things from this thread.
Thanks everyone.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with modules.h and drivers segapla Red Hat 2 08-19-2005 07:40 AM
Install Realtek AC'97 drivers/modules Buck1 Linux - Hardware 3 04-15-2005 10:51 PM
Insert Modules into Kernel aje Linux - General 3 10-30-2004 03:42 PM
depmod doesnt insert proper lines in modules.pcimap for Marvell Network Interface jimmytango829 Linux - Hardware 1 09-30-2004 01:08 AM
can't insert modules into 2.6 Kernel maxi Debian 5 02-11-2004 06:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration