LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 04: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, 07:45 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:31 PM.

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
Open Source Consulting | Domain Registration