LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-23-2009, 06:26 AM   #1
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Rep: Reputation: 16
insmod: error inserting 'vntwusb.ko' : -1 Invalid module format


I was trying to compile a kernel driver for via usb wifi. Everything worked fine for compilation and installation. Then I try to install it with insmod:

Quote:
insmod vntwusb
I get this error:
Quote:
insmod: error inserting 'vntwusb.ko' : -1 Invalid module format
Here is the corresponding line on dmesg

Quote:
vntwusb: version magic '2.6.21.5-smp SMP mod_unload 686 ' should be '2.6.21.5 mod_unload 486 '
on my /lib/modules/ folder I have both:
Quote:
2.6.21.5/
2.6.21.5-smp/
on my /usr/src/ folder I have:
Quote:
linux@ symlink to ->linux-2.6.21.5/
linux-2.6.21.5/
rpm/
I found a similar problem on here

His problem is the inverted of mine. Someone provided a working solution but I don't actually understand it. I thought it would be easier to track my problem in a separate thread.

Thanks all in advance.

Last edited by NightHorse; 06-23-2009 at 06:28 AM.
 
Old 06-23-2009, 06:58 AM   #2
General Failure
Member
 
Registered: Jan 2007
Location: Germany
Distribution: Slackware 13.37
Posts: 387

Rep: Reputation: 37
You are probably running the standard (non-SMP) kernel, right?

Read extra/linux-2.6.21.5-nosmp-sdk/README.TXT to find out how to solve the problem you are having.

The kernel sources are configured for SMP, so your module was built for SMP. Basically you have to re-setup your kernel sources and maybe also headers so that they suit the kernel you are actually running. The script in extra/linux-2.6.21.5-nosmp-sdk/ will do that for you.

Edit: Oh, and you will have to rebuild your module afterwards.

Last edited by General Failure; 06-23-2009 at 06:59 AM.
 
Old 06-23-2009, 07:11 AM   #3
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
As General Failure says - if running a non SMP kernel you have to run a script to fix the kernel sources. This is from the Slackware-HOWTO which is on your install disks and should be read.:
Quote:
Note that if you use the huge (non-SMP kernel) and plan to compile any
third party kernel modules, you may need to apply the kernel patch in
/extra/linux-2.6... or, you could just cd to the kernel sources, run
"make menuconfig", make sure that SMP (and the -smp suffix) are turned
off, and recompile the kernel with "make". But, that's for later --
after the install.
If not then the running kernel version string will show something different than the compiled module.

I definitely recommend reading ALL the Slackware documents on your install disks as they are full of useful (and sometimes essential) information.
 
Old 06-23-2009, 08:40 AM   #4
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Original Poster
Rep: Reputation: 16
Thanks General Failure for the tip. everything is working now and I only need to test the usb module to see if it will work. Will report in a little.

Thanks bgeddy for the HoWTOs. I will go throw them. I am totally new to slackware but I love it.
 
Old 06-23-2009, 12:33 PM   #5
NightHorse
Member
 
Registered: Jun 2009
Location: Egypt
Distribution: Ubuntu 10.04
Posts: 117

Original Poster
Rep: Reputation: 16
I can't seem to get wireless working. I have posted separate thread to make it easier to track since it's different problem. Pls take a look here.
 
  


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
insmod: error inserting 'm2.ko': -1 Invalid parameters nikhil86 Programming 1 04-02-2008 09:26 PM
insmod: error inserting 'usbip.ko': -1 Invalid module format barunparichha Linux - Software 1 01-13-2007 09:51 PM
insmod: error inserting 'module.o': -1 Invalid module format ksrinivas Linux - Newbie 5 10-11-2006 08:29 AM
insmod: error inserting 'new.ko': -1 Invalid module format hemk76 Programming 2 01-26-2005 11:52 AM
insmod: error inserting 'new.ko': -1 Invalid module format hemk76 Programming 2 01-24-2005 11:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:53 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
Open Source Consulting | Domain Registration