LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 01-25-2005, 05:23 AM   #1
hemk76
LQ Newbie
 
Registered: Jun 2004
Location: bangalore
Posts: 9

Rep: Reputation: 0
insmod: error inserting 'new.ko': -1 Invalid module format


hello
i am presently working on 2.6.5-1.358 fedora redhat linux

i compiled my module new.c

in Makefile
obj-m += new.o

make -C /usr/src/linux-2.6.5-1.358 SUBDIRS=$PWD modules

then i tried
insmod new.ko
it is giving this error
" insmod: error inserting 'new.ko': -1 Invalid module format "

then i tried " dmesg "

new: version magic '2.6.5-1.358custom 686 REGPARM 4KSTACKS gcc-3.3' should be '2.6.5-1.358 686 REGPARM 4KSTACKS gcc-3.3'
new: version magic '2.6.5-1.358custom 686 REGPARM 4KSTACKS gcc-3.3' should be '2.6.5-1.358 686 REGPARM 4KSTACKS gcc-3.3'

i tried depmod
depmod: QM_MODULES: Function not implemented

plz help me
thanks in advance
hemanth
 
Old 01-25-2005, 08:45 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
"depmod: QM_MODULES: Function not implemented" normally means you don't have module-init-tools correctly installed. Not sure how you would have ended up on a 2.6 kernel without that being right though...
 
Old 01-26-2005, 11:52 AM   #3
csfalcon
Member
 
Registered: Jun 2004
Location: MD
Distribution: Fedora Core
Posts: 269

Rep: Reputation: 31
In the makefile in /usr/src/linux-2.6.5-1.358 look for the string '2.6.5-1.358custom' and change it to ''2.6.5-1.358'.
 
  


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
Invalid module format king111 Linux - Newbie 4 07-19-2005 02:14 AM
insmod invalid module format csfalcon Linux - Hardware 6 01-24-2005 12:03 PM
insmod: error inserting 'new.ko': -1 Invalid module format hemk76 Programming 2 01-24-2005 11:42 AM
'Invalid module format' loading simple module on Suse Linux Professional 9.1 rocketdude Linux - Distributions 3 07-28-2004 12:40 AM
invalid module format powadha Slackware 5 12-25-2003 05:19 PM


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