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 05-31-2006, 03:37 AM   #1
ashley_31
Member
 
Registered: May 2006
Location: India
Distribution: RedHat Enterprise Linux (Kernel 2.6)
Posts: 42

Rep: Reputation: 15
installing drivers


hi friends..
I've need to install a device driver on my RedHat linux version-4 kernel-2.6.
I have the code of this driver in C.
Please tell me to how to install it such that the driver starts itself immediately with the boot up of the system.
 
Old 05-31-2006, 03:55 AM   #2
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
You should have a README file with your driver explaining you how to install that driver. Here is the global picture:

1- Install your running kernel source.
2- Unpack the driver source code to some directory.
3- Configure, compile and install your driver.

ie:
Code:
yum install kernel-devel
tar zxf mydriver.tar.gz
cd mydriver
./configure
make
make install
Now, if you need more explanations, you should probably give more info like:
- What did you try already that did not work
- What "device driver" are you trying to install
- etc...
 
Old 05-31-2006, 03:59 AM   #3
vkmgeek
Member
 
Registered: Feb 2006
Location: Ahmedabad
Distribution: rhel5
Posts: 185
Blog Entries: 2

Rep: Reputation: 31
Hi,

You need to compile the code first and u must have ".o" object file...
Then you can have lot more option to let the driver attached wih kernel automatically. Either you can manually do it with insmod mydriver.o
or u can put it in rc.local or u can rebuild ur kernel by putting ur .o file at proper place.......
 
Old 05-31-2006, 06:06 AM   #4
ashley_31
Member
 
Registered: May 2006
Location: India
Distribution: RedHat Enterprise Linux (Kernel 2.6)
Posts: 42

Original Poster
Rep: Reputation: 15
where is the location of rc.local and where is the code placed so that i can add my .o file into it at the proper position..??
 
Old 05-31-2006, 06:33 AM   #5
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
rc.local is situated in your /etc directory. Now, inserting a line there to load your driver (insmod /path/to/your/driver.o) might not be a good option, especially if you need this driver during boot time, because the rc.local script is executed after every other script for the specific runlevel has been run.

Unless you are installing some very rare driver coded for the occasion, a decently coded driver should come with some documentation (README and/or INSTALL) describing the configure/build/install procedure to copy the driver in the correct module location for your running kernel (/lib/modules/2.6.x-y.zzzz_DIST/...) and configure your system so that it can be loaded automagically using modprobe (by making some entries in /etc/modules.conf or /etc/modprobe.conf and/or /etc/modprobe.d). Once this is done, modprobe will run insmod for you when it is needed.

As I stated in my first post, this is usually as easy as running "./configure && make && make install".

Now (again... unless you're installing something very rare and unknown...) if you tell us which driver you're trying to install, we might be able to give you more info.

Last edited by zeitounator; 05-31-2006 at 06:35 AM.
 
  


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 in installing drivers for myson mtd80x fast based ethernet card drivers pop_harish Linux - Hardware 0 02-12-2005 06:27 AM
installing drivers mickstaff Red Hat 6 03-05-2004 06:41 PM
Installing RAID Drivers before Installing RH 9 kwright Linux - Newbie 3 08-25-2003 10:57 AM
Installing Drivers kjax Linux - Newbie 4 06-21-2002 04:55 PM
Installing Drivers Paper Boy Linux - Software 6 04-14-2002 07:48 PM

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

All times are GMT -5. The time now is 09:31 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