Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-18-2002, 09:23 PM   #1
LQ Newbie
Registered: Nov 2002
Location: edmonton
Distribution: red hat, mandrake
Posts: 4

Rep: Reputation: 0
more about linux drivers & modules?

I am new linux fan so bare with me.

I am wanting to find out more about installing drivers for devices in linux. Is the actual terminology called inserting a module and re-compiling the kernel?

Please someone explain to me in exact terminology the process of getting a device to work in linux with a new downloaded driver. If possible, delve into the stuff about tar balz? compression? etc etc.
Old 11-18-2002, 11:14 PM   #2
Registered: Feb 2002
Location: Carson City, Nevada
Distribution: Gentoo / SuSE 9.1 Pro (both A64)
Posts: 159

Rep: Reputation: 30
What the hey, I'll give it a go.

Most traditional Linux users recompile the kernel to optimize it for their hardware. Linux as distribuited is intended to support as much hardware as is reasonably possible, so the odds of it being usable 'out of the box' are greater for the majority. For instance; You don't need every network card driver known to man (or machine), just the one for your card.

If you download a driver (or a module) as a tarball. You have to unpack it (see man tar, man gzip) Like unzipping a zip file... Lots of folks recommend working out of your home dir to do this... Personal preference I think.

Then you have to compile it, you pretty much have to have the kernel development stuff installed and have compiled the kernel to do this. Unless you're running the 'stock' kernel, which would match your kernel source stuff which you still need to have installed.

Most packages come with things all set up to make it reasonably easy to to do this. Usually this is outlined in a readme or something of that natrue. Or documented where you obtained the tarball. Frequently both.

Traditionally ./configure, make, and make install for 'software packages; and maybe ./configure make and insmod... for drivers I think.

After compiling it, one has to install it. Either adding it, along with any arguments or whatever to etc\modules or modules.config or whatever your distro uses... Or one one can test it 'on the fly' by doing an insmod on it (insert or install? module) again with any appropriate arguments... Note after testing it, you would still add it to modules so it's loaded automatically at boot time.

You can choose to build some drivers / modules into the kernel, or keep them as modules. Smaller kernels load faster and are more portable, like if you needed Linux on a floppy for a rescue disk or whatever.

Some folks like to make the kernel as small as possible, just to see who can be 'lete (eliete), super hacker, etc... Whatever, I'm happy if everything works well and boots quickly myself. I have plenty of room for the kernel.

This is the $0.05 tour, of the whole idea. I probably have a detail or two fuzzy or completely off base, but that's the general idea. And someone will no doubt point out my errors, then I learn too


For that matter, someone probably spun out a better explanation while I was wavering on how to put this 'n that...

Last edited by Psycho; 11-18-2002 at 11:23 PM.
Old 03-21-2004, 05:29 PM   #3
Registered: Mar 2004
Posts: 90

Rep: Reputation: 15

Is there any thing like a device manager where you can quickley install drivers with out having to recompile the kernal?
Old 03-21-2004, 05:38 PM   #4
LQ Newbie
Registered: Nov 2003
Posts: 25

Rep: Reputation: 15
You dont need to recompile your kernel to install drivers. Including support for your hardware in the kernel is optional (except of course, things like IDE controller, chipset etc etc).

If you wanted to say, install a driver for a sound card, where support is not built into the kernel, you would download either a Package, and use the utility for that package type (distro-dependant), or download the source.

If compiling from source, you should
A) ./configure (if it doesnt want to, theres no need to worry about this)
B) make && make install

From my experience (I could be wrong here), doing make install should setup the driver to be ready to use (copy files to the appropriate directory, and modprobe (load) them).

To see what modules (drivers), are loaded, type lsmod
If you build the driver package, but it doesnt modprobe, you will have to type "modprobe DRIVERNAME"
If you then want it to load on startup you need to add that line to your startup script (files are named different depending on distro).
In slackware, I know I add module loads to /etc/rc.d/rc.local, although I believe the proper way is to add the line to /etc/modprobe.conf or conf.modules. I'm really hazy on which startup file to add the line to, so if you get to the "modprobe MODULENAME" stage, and it works, you might want to check around for the proper file to add that line to, instead of guessing at it like I am. =)

The benefit of kernel builtin modules, is that they load automatically, and it can (apparently) speed up your system. Im a newbie too though, so I don't really know the reason. . .


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
Linux & QNX DEVICE DRIVERS jdevi Linux - Networking 1 03-28-2005 03:59 AM
LINUX & QNX Device Drivers jdevi Programming 1 03-28-2005 03:57 AM
kernel failing loading unnessary modules && issues upgrading to kde 3.2.2 promark Slackware 2 06-09-2004 05:03 PM
Linux & eth drivers Sarinyo Linux - Hardware 3 03-28-2004 10:44 AM
nVIDIA drivers for linux & Slackware 9 zeppelin Slackware 7 07-22-2003 03:29 AM > Forums > Linux Forums > Linux - Newbie

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

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