Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 04-13-2005, 03:38 AM   #1
Registered: Apr 2004
Distribution: Mandriva, Ubuntu, openSuSE, FreeBSD, OpenSolaris, PC-BSD
Posts: 195

Rep: Reputation: 30
Why driver needs to be compiled against the running kernel?

I've been using Linux since a long time, but I've always been wondering: why does a driver made only for Windows 98 often work with Windows 2000/XP, even if the kernel is different? And for this reason, why Linux kernel module only works with the kernel it has been compiled against? This makes it difficult for hardware-vendors to provide drivers, since there are so many different distributions and kernels.

Does this have something to do with distributions changing the kernel so much? However, even the same distribution's different, minor kernel releases have required recompiling the module always again, as far as I've tried it.

Has Linux-kernel been written intentionally like this? I want to know.
Old 04-13-2005, 04:40 AM   #2
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there

one of the major diference in 2.4 to 2.6 kernel was that the module format has changed from name.o to name.ko so u need to get different modules
and if u compile that with your kernel then u wil get better performance also since the kernel is configurable so u need not get the same configuration of the kernel where it was precompiled,this is not the case in windows where the kernel of the windows is same everywhere

Old 04-13-2005, 05:59 PM   #3
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
sometimes you can force missmatched modules to load in Linux as well
it is even possible to do some surgery on old modules and change symbol names to match new ones and such so they will work -- but if you got the source code why not recompile and have a more stable end result


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
running compiled c++ programs in Fedora klmbrt Linux - Newbie 2 03-02-2005 10:54 AM
compiling sata driver for new non-running kernel krazyjase Linux - General 0 01-19-2005 07:19 PM
Running programs compiled under RH9 Pazabo Fedora 2 08-30-2004 10:54 AM
WebCam driver not compiled for my kernel daftwight Linux - Newbie 2 01-13-2004 04:18 PM
problem running progs compiled with g++ nautilus_1987 Linux - General 11 10-06-2002 03:16 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:32 AM.

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