LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-08-2014, 01:13 AM   #1
jaatvishal
LQ Newbie
 
Registered: May 2013
Location: India
Posts: 3

Rep: Reputation: Disabled
How to build a kernel driver module which works for all systms having the same kernel


Hello,

I need to build a kernel driver module with kernel version 2.6.32.61.
And wants that this module will work for any Linux system having this kernel version. I have seen if the config files are different and the kernel versions are same, then the driver does not work. The driver works, only if the kernel with which the driver is built and the target kernel, both built with the same config files.


Thanks!
 
Old 01-10-2014, 11:42 AM   #2
prabhuraj
LQ Newbie
 
Registered: Aug 2011
Posts: 26

Rep: Reputation: Disabled
Hi,
You can build the module once for a kernel version and use it to load with different kernel configurations of the same version, if the module you are loading does not have any dependency with respect to the kernel code changes/configurations you do.
When you do "insmod <module_name>", while inserting the driver, this will probe for any dependency, version mismatch, module info etc.
If the different configurations of the same kernel version that you use have any dependency over the module you want to load, you may face version mismatch problems.

To check the dependency, you can can try "modinfo <module_name.ko>.
This will give you some useful info :
http://www.tldp.org/HOWTO/Module-HOWTO/x627.html

Cheers
 
  


Reply



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
[Error] Kernel Module : No kernel module build environment saman007uk Debian 7 09-09-2006 06:34 PM
LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree LXer Syndicated Linux News 0 09-03-2006 08:21 PM
how to know whether a driver or other module build-in kernel ? jiawj Slackware 1 04-10-2005 02:21 AM
a driver, build in kernel, but I wanna load with it from module jiawj Slackware 2 03-10-2005 10:06 PM
new driver module claims to be for a different kernel build chr15t0 Linux - General 2 03-21-2004 04:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:25 AM.

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
Open Source Consulting | Domain Registration