LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-04-2011, 12:37 PM   #1
gvassallo
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Rep: Reputation: Disabled
LKM


Are LKM backwards compatible relative to the version of the kernel they had been built under? One would guess that the answer is yes within limits. Otherwise how would H/W vendors distribute their products. However, I have had some trouble loading a driver built using 2.6.40 onto a 2.6.38 kernel as well as a 3.0 kernel. It loads on to a 2.6.40 kernel and operates as expected. Any comments relative to loading LKMs are welcomed.

Thanks
 
Old 09-04-2011, 12:45 PM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Hi and Welcome to LQ!
The kernel modules are kernel specific. They are either provided directly by the kernel or built using the header files for the specific kernel you are using. If you want to run a module on a 3.0 kernel you have to build it on that kernel. Hope that's clear.
ciao,
jdk
 
Old 09-04-2011, 02:20 PM   #3
gvassallo
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Grazie JDK,

That is unfortunate and I guess that if I want my LKM to be distributed I'll need to submit it into the source tree. Is that a correct assumption?

Ciao
GV
 
Old 09-04-2011, 03:02 PM   #4
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Prego,
I don't think so. If the module is integrated into the kernel then its capabilities remain. The end user doesn't need to do anything. If it worked before it works which each new kernel. If you compile your own module then you'll get the new header files along with the new kernel (I do this) and again, it's no big deal. Tranquillo! I suppose you could compile it yourself for each new kernel that's released but that is a big deal. But what's wrong with releasing your source code? I don't see the problem.
ciao,
jdk

Last edited by jdkaye; 09-04-2011 at 03:04 PM.
 
Old 09-04-2011, 05:51 PM   #5
gvassallo
LQ Newbie
 
Registered: Sep 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled
Red face

Hello,

Its not that I do not want to submit my source code its just that I was surprised by the (implied)requirement to do so.
Thanks again for your thoughtful and quick reply.
 
Old 09-05-2011, 01:00 AM   #6
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
You're welcome again but remember Linux unlike MacOS servers a huge number of different architectures. If you want your application to be available for ALL Linux users and you require a special module for it to run you have two options:
1. Convince the kernel developers to include your module in the kernel. But the kernel source code is available and so your module's source code would be available.
2. If you wish to supply your software to all architectures then you would make the source code available or be prepared to do a huge amount of cross-compiling.
Do you see a sane way to distribute your kernel module without contributing the source code? Maybe I'm just being stupid but I don't see how you could do it. I still don't understand why distributing source code would be a problem even if it weren't necessary.
ciao,
jdk
 
  


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
Checking for an LKM timmyj86 Programming 3 04-15-2009 10:49 PM
LKM testing synoptyck Linux - Kernel 0 02-13-2009 11:26 PM
Lkm sci3ntist Programming 1 11-27-2007 04:18 PM
LKM talking to another LKM? Ljunge Programming 4 11-13-2007 02:29 PM
problem in LKM kumar.manoj412 Linux - General 2 05-26-2007 01:19 PM


All times are GMT -5. The time now is 04:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration