LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 10-25-2011, 04:29 PM   #1
bayoulinux
Member
 
Registered: Oct 2011
Posts: 34

Rep: Reputation: Disabled
Install older kernel module into newer kernel - no symbol version for module


Hi:

Is a particular Linux kernel version backwards compatible with older
kernel modules?

I have build successfully a kernel module for two kernel versions
2.6.18 (CentOS 5.2) and 2.6.32 (CentOS6.0).

With kernel version 2.6.32 (CentOS6.0) running, I can successfully
insmod my 2.6.32 module into it. That's all well and good, life as
expected... However, with the same 2.6.32 kernel running, I cannot
seem to successfully insert into it my 2.6.18 (CentOS 5.2) built
module. When I try, I get the kernel error message: "no symbol version for module_layout".

Should I may able to (skipping the 'why would you do this' discussion... at least for the moment) take my kernel module built under 2.6.18 (CentOS 5.2) and insert it
successfully interl a running 2.6.32 (CentOS6.0) kernel?


Here's a little more info:

Centos6Machine# uname -r
2.6.32-71.el6.i686

Centos6Machine# modinfo mykernmod.ko
.
.
.
vermagic: 2.6.18-274.7.1.el5 SMP mod_unload 686 REGPARM 4KSTACKS
gcc-4.1

Thanks!
 
Old 10-25-2011, 05:02 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 326Reputation: 326Reputation: 326Reputation: 326
Quote:
Originally Posted by bayoulinux View Post
Hi:

Is a particular Linux kernel version backwards compatible with older
kernel modules?
No, it is only compatible with the kernel it was built for.
 
Old 10-25-2011, 09:25 PM   #3
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,377

Rep: Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108
Absolutely not!!

When a module is loaded, it literally becomes a part of the kernel, as though it had been loaded at boot time.

If the module was not built precisely for the exact kernel image that it has just been made a blood-brother part of ... your system will explode.

Anytime you make any change whatsoever to "the kernel," you must rebuild the entire kernel, "modules and all."
 
Old 10-26-2011, 12:26 AM   #4
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
The only way you can insert the module in the 2.6.32 kernel is by rebuilding the module from source.
 
Old 10-26-2011, 04:32 AM   #5
bayoulinux
Member
 
Registered: Oct 2011
Posts: 34

Original Poster
Rep: Reputation: Disabled
Okay - its seem like "no" is the answer. ;-) I appreciate folks looking at the posting - thanks again.
 
  


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
building older version of kernel on newer version machine chakradhar.nannuri Linux - Newbie 4 01-25-2011 09:46 PM
Kernel module problem - unknown symbol in module mlangdn Slackware 3 08-30-2010 11:10 PM
kernel module symbol error b123coder Programming 0 12-03-2004 03:56 AM
how to compile a module with a newer version of the linux kernel? fvarela Programming 2 07-29-2004 02:00 AM
Xfree prob radeon.o kernel module version is 1.1.1 but version 1.5.0 or newer needed. jimdaworm Slackware 0 10-01-2003 06:27 PM


All times are GMT -5. The time now is 09:16 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration