-   Programming (
-   -   gcc march (

agdepus 05-24-2004 09:03 AM

gcc march
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

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......:-)


keefaz 05-24-2004 11:27 AM

Did you compile the kernel 2 times or maybe you set the wrong EXTRAVERSION parameter in Makefile from kernel source tree.

agdepus 05-24-2004 01:05 PM

I did not compile the kernel at all. Do I have to do that in order to
build an installable module??? :-)

keefaz 05-24-2004 02:08 PM

No lol, I asked this because the difference between kernel names.
And what output does the uname -r give ?

agdepus 05-25-2004 03:11 AM


keefaz 05-25-2004 07:45 AM

Does the error happen if you don't set the -march parameter ?

And do you have these lines in your source code :

#include <linux/modversions.h>

agdepus 05-25-2004 08:37 AM

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
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:
End of search list.
GNU assembler version (i486-suse-linux) using BFD version 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.

keefaz 05-25-2004 11:55 AM

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

agdepus 05-26-2004 09:11 AM

That's it. Thanks :-)
Back to curses......

All times are GMT -5. The time now is 09:05 PM.