?
Solved

Loading a Kernel Module in Linux

Posted on 2006-07-19
5
Medium Priority
?
307 Views
Last Modified: 2010-04-20
HI expert
I am new to kernel module Loading under linux , i compiled the sample program

but  i could not load the module using insmod  , modprobe
i am using Mandriva 10.0      kernel version   uname -r    2.6.12-12mdk-i686-up-4GB

insmod: error inserting 'hello-2.o': -1 Invalid module format

FATAL: Module hello-2.o not found  

are the 2 errors that i got ,

please let me what is the correct way to load a kernel module
0
Comment
Question by:mmadhuso
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 500 total points
ID: 17139164
insmod /path/to/kernel/module/hello-2.o

I presume that you are working through this "howto?":

http://www.tldp.org/LDP/lkmpg/2.6/html/index.html

(   (()
(`-' _\
 ''  ''
0
 

Author Comment

by:mmadhuso
ID: 17139856
thanks , its working now


One more stuff   have u used

according to http://puggy.symonds.net/~abhi/files/mm/node122.html

De-Allocating a Memory Region

 Function sys_munmap()
 Function do_munmap()

To modify heap

 Function sys_brk()  
 Function do_brk()

thanks for the help
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 17140631
I'm afraid that I've done very little work with kernel modules, other than the odd patch of other people's work. The only advice that I can offer, is make sure that allocations in the init are deallocated in the exit, otherwise, your kernel will have stability problems!

(   (()
(`-' _\
 ''  ''

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses
Course of the Month14 days, left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question