Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-08-2014, 02:13 AM   #1
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


I need to build a kernel driver module with kernel version
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.

Old 01-10-2014, 12:42 PM   #2
LQ Newbie
Registered: Aug 2011
Posts: 26

Rep: Reputation: Disabled
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 :



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
[Error] Kernel Module : No kernel module build environment saman007uk Debian 7 09-09-2006 07: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 09:21 PM
how to know whether a driver or other module build-in kernel ? jiawj Slackware 1 04-10-2005 03:21 AM
a driver, build in kernel, but I wanna load with it from module jiawj Slackware 2 03-10-2005 11:06 PM
new driver module claims to be for a different kernel build chr15t0 Linux - General 2 03-21-2004 05:48 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:29 PM.

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