LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 07-31-2013, 04:58 AM   #1
lijodevasia
LQ Newbie
 
Registered: May 2013
Posts: 8

Rep: Reputation: Disabled
Building an out-of-tree module without building the kernel source


Hi,

I am trying to build a kernel module for mips target using a fresh kernel source.I am buiding the module outside the kernel source.Since its time consuming to build the whole kernel source, I did "make module_prepare" and then built my module.But when I tried inserting the module I got version mismatch errors.Also modprobe is not available in the target.

Can anyone please suggest a method for building kernel module without compiling the whole kernel?
 
Old 07-31-2013, 08:45 AM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180Reputation: 3180
It sounds to me like the kernel source-tree that's being referred to when building the module doesn't actually match the kernel that's running right now . . .
 
Old 08-01-2013, 12:45 AM   #3
lijodevasia
LQ Newbie
 
Registered: May 2013
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thank you for your quick response.

I'm building the module from the same kernel source that is compiled to generate the image that is running in the target.
Since I was just doing "modules_prepare" before building the modules, Module.symvers file was not generated for the kernel.I read in a tutorial that this might lead to version mismatch errors.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help Building Driver Module From Source doctorcisco Programming 4 04-01-2007 11:51 AM
building module in compile kernel 2.6 ptlchetan Programming 1 10-17-2006 08:09 AM
Building a new module into a Kernel dsylvester Slackware 4 10-03-2006 04:16 PM
Building kernel module from multiple source file in 2.6 kernel yogeshwar_s Programming 1 12-20-2004 09:31 AM
Building a module within a kernel brianvdc Linux - General 1 12-11-2003 08:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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