LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-26-2004, 09:29 PM   #1
lukebeales
Member
 
Registered: Oct 2003
Location: Australia
Distribution: Slackware/LFS/Ubuntu
Posts: 89

Rep: Reputation: 15
svgalib module - wrong format


howdy all,
I am compiling svgalib (testing version 0.9.19 i believe) on a 2.6.7 system. It all compiles without a hitch but the svgalib_helper module always ends in .o (instead of .ko) and does not work with modprobe (i'm guessing depmod -a doesn't find it) even though it's installed to /lib/modules/2.6.7/kernel/misc. If I try insmod it comes up with the following:

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

I am able to compile correct modules as LiRC has a few with the .ko extension and they work perfectly. How can I get svgalib to create the .ko module instead of the .o? Or is it just an issue of renaming it? Thanks in advance.
 
Old 08-27-2004, 06:35 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
I'm not sure of the details, but Linux 2.6 (the kernel) uses a new kernel module format with the .ko extension, rather than the standard .o module format used for previous versions of the kernel. It does less work in user-space, presumably making it more efficient.

You should have a tool called insmod.old, which automatically gets called by insmod to install old-style modules. I also suspect that you need to enable support for them in the kernel for that to work. So you might just be able to load it with
Code:
  insmod svgalib_helper.o
If not, then the place to look for the particular error you're getting is /var/log/messages.

As to how to compile them, I think it's just an option to gcc; have you tried reading the gcc manpage?
 
Old 08-27-2004, 09:34 AM   #3
lukebeales
Member
 
Registered: Oct 2003
Location: Australia
Distribution: Slackware/LFS/Ubuntu
Posts: 89

Original Poster
Rep: Reputation: 15
Thanks for the reply . I don't have an insmod.old but have read about it. This is actually a custom linux install so that's probably why it's not there. I did a little digging around though and found a few mentions of the .ko module in the Makefile, and right down the bottom there is a line that installs the .o module...but hidden off the side of the screen is a "||" which on the other side is the install command for the .ko module, so it was making it all along, just since it managed to successfully install the first module, it figured there was no need to install the other. Changing the "||" to a "&&" though has fixed it. I wonder if that's a bug or intentionally in there?
 
  


Reply



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
Svgalib and Svgalib-devel on FC1 Michele Spinolo Fedora 1 11-11-2004 09:56 AM
Bug report: wrong date/time format in last visited wipe LQ Suggestions & Feedback 0 07-29-2004 06:21 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
the format of the date in stat in wrong rhuser Programming 9 03-16-2003 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:38 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