LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 01-22-2009, 02:25 PM   #1
nickolais
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 1
Preferred method to deploy RHEL driver for new device


Hello,
My company has designed a new PCIe device and I have developed a new driver for use with the device. To test the driver, I have been loading it with the insmod command.

My customer uses RHEL 5, so I am testing and targeting that distribution. What is the preferred method that I deploy my driver? For instance, how should the user install the driver on their machine? Is it acceptable that they insmod the driver as well? Alternatively, would they want to recompile their kernel with the new driver in it? Do Red Hat users compile their own kernels?

I have not found any discussions or resources about this topic. If someone could point me in the direction of some I would be greatly appreciative. Thanks!
 
Old 01-22-2009, 02:37 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,630

Rep: Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573
Quote:
Originally Posted by nickolais View Post
Hello,
My company has designed a new PCIe device and I have developed a new driver for use with the device. To test the driver, I have been loading it with the insmod command.

My customer uses RHEL 5, so I am testing and targeting that distribution. What is the preferred method that I deploy my driver? For instance, how should the user install the driver on their machine? Is it acceptable that they insmod the driver as well? Alternatively, would they want to recompile their kernel with the new driver in it? Do Red Hat users compile their own kernels?

I have not found any discussions or resources about this topic. If someone could point me in the direction of some I would be greatly appreciative. Thanks!
Well, some users do compile their own kernels...some don't. Modprobe/insmod is a fairly 'standard' way of putting a new module into service, with lots of documentation available on getting it to autoload for different systems at boot, etc.

Kernel building can get messy, and if you're running a 24/7 production environment, you want more generic, so the dreaded 2 AM phone-calls won't depend on the one guy who knows how to build a kernel. Plus, using insmod/modprobe to shove a kernel module in, gives you flexibility...if there's a device problem, you can easily boot to CD/DVD/single-user, and comment it out, to stop any boot-time problems from stopping the boot process. If it's built in the kernel...may not be so easy.....

My $0.02 worth, is to look at the nVidia drivers, and how they do it. They provide an installer, along with several pre-compiled modules for different kernels. When you run the installer, and one of the pre-compiled ones matches what you've got, they shove it in. If not, the kernel source you've got, along with the code they provide, builds one to match your system on the fly.
 
Old 01-22-2009, 05:15 PM   #3
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 171Reputation: 171
You might want to look into dkms. Which can automatically rebuild your driver against any newly installed kernel at boot time. Rpmforge provides their nvidia drivers in this fashion. The advantage of the dkms method is that you never have to wait for the new binaries to be created for your kernel. It does require that they install the matching kernel-devel at the time they install the new kernel (they are always released as a matched pair).

From yum info dkms:

Quote:
Summary: Dynamic Kernel Module Support Framework
Description:
DKMS stands for Dynamic Kernel Module Support. It is designed to create
a framework where kernel dependant module source can reside so that it
is very easy to rebuild modules as you upgrade kernels. This will allow
Linux vendors to provide driver drops without having to wait for new
kernel releases while also taking out the guesswork for customers
attempting to recompile modules for new kernels.
 
  


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
Multiple Device driver from single device driver???? rickhg12hs Linux - Kernel 3 05-25-2008 12:11 AM
How to determine device driver versions in RHEL 4 Update 4? bigd00dy Linux - Hardware 2 02-28-2008 06:46 PM
How to determine device driver versions in RHEL 4 Update 4? bigd00dy Linux - Newbie 1 02-28-2008 05:24 PM
probe method on bus and device driver not being called kunice Linux - Hardware 0 02-24-2008 11:47 AM
Installing RHEL 4: no device driver for SATA HDD cool_guy_km Linux - Hardware 1 10-17-2007 02:24 PM


All times are GMT -5. The time now is 05:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration