Solved

Loading a Kernel Module in Linux

Posted on 2006-07-19
5
296 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
5 Comments
 
LVL 22

Accepted Solution

by:
pjedmond earned 125 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

813 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now