LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Preferred method to deploy RHEL driver for new device (https://www.linuxquestions.org/questions/red-hat-31/preferred-method-to-deploy-rhel-driver-for-new-device-699197/)

nickolais 01-22-2009 02:25 PM

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!

TB0ne 01-22-2009 02:37 PM

Quote:

Originally Posted by nickolais (Post 3417759)
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.

lazlow 01-22-2009 05:15 PM

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.



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