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 05-24-2004, 10:03 AM   #1
agdepus
LQ Newbie
 
Registered: May 2004
Location: Norway
Distribution: SuSE 8.2
Posts: 5

Rep: Reputation: 0
gcc march


Hello,
Using suse 8.2 i am trying to develop a driver for a card (plx 9030 chip).
I am running an athlon 2400.

When i try to load the driver using insmod this happens:

kernel-module version mismatch
driver.o was compiled for kernel version 2.4.20-4GB while this kernel is version
2.4.20.GB-athlon.

I have set march=athlon.
And inlude files to /lib/modules/2.4.20-4GB-athlon/build/include

Any ideas?
I am a hardware developer gone mad......:-)

agdepus
 
Old 05-24-2004, 12:27 PM   #2
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
Did you compile the kernel 2 times or maybe you set the wrong EXTRAVERSION parameter in Makefile from kernel source tree.
 
Old 05-24-2004, 02:05 PM   #3
agdepus
LQ Newbie
 
Registered: May 2004
Location: Norway
Distribution: SuSE 8.2
Posts: 5

Original Poster
Rep: Reputation: 0
I did not compile the kernel at all. Do I have to do that in order to
build an installable module??? :-)
 
Old 05-24-2004, 03:08 PM   #4
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
No lol, I asked this because the difference between kernel names.
And what output does the uname -r give ?
 
Old 05-25-2004, 04:11 AM   #5
agdepus
LQ Newbie
 
Registered: May 2004
Location: Norway
Distribution: SuSE 8.2
Posts: 5

Original Poster
Rep: Reputation: 0
2.4.20-4GB-athlon.....
 
Old 05-25-2004, 08:45 AM   #6
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
Does the error happen if you don't set the -march parameter ?

And do you have these lines in your source code :
Code:
/* Deal with CONFIG_MODVERSIONS */
#if CONFIG_MODVERSIONS==1
#define MODVERSIONS
#include <linux/modversions.h>
#endif
 
Old 05-25-2004, 09:37 AM   #7
agdepus
LQ Newbie
 
Registered: May 2004
Location: Norway
Distribution: SuSE 8.2
Posts: 5

Original Poster
Rep: Reputation: 0
I included the output from gcc below. Including the modversions did not fix it....
My problem is that i know too little about this stufffff...

I'll never give up...:-)

compiling: SupportFunc.c
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/3.3/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libd
ir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --disable-checking --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --wi
th-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.3 20030226 (prerelease) (SuSE Linux)
/usr/lib/gcc-lib/i486-suse-linux/3.3/cc1 -quiet -v -I/usr/src/PlxLinux/include -I. -I../common -I../common/PlxChip/Pci9030 -I/lib/modules/2.4.20-4GB-athl
on/build/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -DGCC -DPCI_CODE -DPLX_LITTLE_ENDIAN -D__KERNEL__ -DMODULE -D__NO_VERSION__ -DPCI
9030 -DLINUX_DRIVER ../common/SupportFunc.c -quiet -dumpbase SupportFunc.c -march=athlon -auxbase-strip Driver/Obj/SupportFunc.o -O2 -Wall -version -o - |
/usr/lib/gcc-lib/i486-suse-linux/3.3/../../../../i486-suse-linux/bin/as -V -Qy -o Driver/Obj/SupportFunc.o -
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64355
GNU C version 3.3 20030226 (prerelease) (SuSE Linux) (i486-suse-linux)
compiled by GNU C version 3.3 20030226 (prerelease) (SuSE Linux).
#include "..." search starts here:
#include <...> search starts here:
/usr/src/PlxLinux/include
.
../common
../common/PlxChip/Pci9030
/lib/modules/2.4.20-4GB-athlon/build/include
/usr/local/include
/usr/lib/gcc-lib/i486-suse-linux/3.3/include
/usr/i486-suse-linux/include
/usr/include
End of search list.
GNU assembler version 2.13.90.0.18 (i486-suse-linux) using BFD version 2.13.90.0.18 20030121 (SuSE Linux)
In file included from /lib/modules/2.4.20-4GB-athlon/build/include/linux/tqueue.h:19,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/aio.h:4,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/fs.h:201,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/capability.h:17,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/binfmts.h:5,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/sched.h:10,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/mm.h:4,
from /lib/modules/2.4.20-4GB-athlon/build/include/linux/iobuf.h:11,
from ../common/SupportFunc.c:42:
/lib/modules/2.4.20-4GB-athlon/build/include/asm/system.h: In function `__set_64bit_var':
/lib/modules/2.4.20-4GB-athlon/build/include/asm/system.h:189: warning: dereferencing type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.20-4GB-athlon/build/include/asm/system.h:189: warning: dereferencing type-punned pointer will break strict-aliasing rules


Linking driver: Pci9030.o


Device driver "Pci9030/Driver/Pci9030.o" built sucessfully.
 
Old 05-25-2004, 12:55 PM   #8
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
Maybe a tip :

edit /lib/modules/2.4.20-4GB-athlon/build/include/linux/version.h

Look at the value for UTS_RELEASE, if it is set it to 2.4.20-4GB-athlon if not set the value
 
Old 05-26-2004, 10:11 AM   #9
agdepus
LQ Newbie
 
Registered: May 2004
Location: Norway
Distribution: SuSE 8.2
Posts: 5

Original Poster
Rep: Reputation: 0
That's it. Thanks :-)
Back to curses......
 
  


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
March of the Penguins movie - Thumbs up! J.W. General 2 07-10-2005 08:04 PM
mcpu vs march Spaz17 Linux - Newbie 6 12-31-2003 01:28 AM
-march optimisation for kernel BenPope Linux - General 2 09-03-2003 12:36 PM
march 8th 2003 SeT General 11 03-10-2003 11:27 PM
Does -march=athlon help? wapcaplet Linux - Software 1 02-26-2003 03:57 AM


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