Sponsored Content
Operating Systems Linux Fedora Is Kernel module is the same as a device driver? Post 302521856 by Corona688 on Thursday 12th of May 2011 12:21:46 PM
Old 05-12-2011
Quote:
Originally Posted by newlinuxuser1
BTW, is there a database or repository to check on existing drivers before buying a device?
The closest thing Linux has to a central repository is the kernel source itself(and the information provided by make menuconfig). But it's usually chipset-oriented, not device-oriented -- it will tell you the driver supports Realtek xxxxxx, not that it supports So-And-So Generic Brand Name Network Card. So I usually just google it, and that tells me what module to use if any, and from there I can find info in the kernel configuration utility.
Quote:
My understanding that in most cases Linux drivers aren't provided by manufacturers but mostly by a community.
Correct. The same community that maintains the Linux kernel I think, since almost all of Linux's open device drivers are bundled with the kernel source code.
Quote:
And, is there an issue of using old drivers with newer versions of kernel
When you update your kernel, you update your drivers too, for they come with it. (third-party drivers excepted.) You can have drivers for several different kernels installed and they won't overlap because the kernel knows what version it is and loads from different directories (/lib/modules/kernel-version/...) This is where third-party drivers go too, so when you update your kernel, if you didn't reinstall the third-party driver, the new kernel simply won't find it.

Binary drivers from third parties usually need to be updated for new kernel versions. They often come in two parts, a binary part that changes less often, and a small stub of source code to tie it to the kernel. It's this stub that gets compiled to turn the binary into a driver Linux can load.

Even then, sometimes a newer kernel means you need a newer binary too. A newer kernel can mean architecture changes inside the kernel which they have to re-engineer something to fit.
Quote:
It's my understanding that 64-bit and 32-bit require different drivers.
Yes, they are very different. Broadcom for instance has two versions of its proprietary driver, one for 32-bit and one for 64-bit Linux systems. A 64-bit kernel can run 64-bit and 32-bit programs, but a 32-bit kernel can only run 32-bit programs.

Other architectures need their own drivers too. SPARC and PPC and ARM all need their own drivers. Even if it's the same device driver being compiled, the executable code naturally ends up being very different.
Quote:
Are Linux drivers universal and fit into all Linux flavors or let say Fedora needs one driver and Debian another?
That depends. The Linux kernel is extremely configurable, and radically different configurations of the kernel may not work with drivers meant for a different configuration. If at all possible you'd want a device driver built inside, or at least using the same source code and configuration used to build your kernel.
This User Gave Thanks to Corona688 For This Post:
 

4 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Kernel and Device Driver Programming

I am looking for a guide on how to program for either the Linux or FreeBSD (includes 4.4BSD, NetBSD or OpenBSD) kernel. I would prefer to learn how to write device drivers, but anything would help. If you know, please email me at *removed* or leave a post here Regards, Farhan (0 Replies)
Discussion started by: Farhan
0 Replies

2. Solaris

SUNWglmr -- rasctrl environment monitoring driver for i2c or SCSI device driver ?

I've been researching minimizeing Solaris 8 and found that on the web page http://www.sun.com/bigadmin/content/packagelist/s8u7PkgList/p2.html the package SUNWglmr is listed as "rasctrl environment monitoring driver for i2c, (Root) (32-bit)" while in the document "Solaris 8 minimize-updt1.pdf"... (1 Reply)
Discussion started by: roygoodwin
1 Replies

3. Linux

Linux Device Driver: avoid mem copy from/to user/kernel space

I recently started working with Linux and wrote my first device driver for a hardware chip controlled by a host CPU running Linux 2.6.x kernel. 1. The user space process makes an IOCTL call with pointer to a user memory buffer. 2. The kernel device driver in the big switch-case of IOCTL,... (1 Reply)
Discussion started by: agaurav
1 Replies

4. UNIX for Advanced & Expert Users

Get pointer for existing device class (struct class) in Linux kernel module

Hi all! I am trying to register a device in an existing device class, but I am having trouble getting the pointer to an existing class. I can create a class in a module, get the pointer to it and then use it to register the device with: *cl = class_create(THIS_MODULE, className);... (0 Replies)
Discussion started by: hdaniel@ualg.pt
0 Replies
All times are GMT -4. The time now is 10:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy