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
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
05-24-2004, 09:03 AM
#1
LQ Newbie
Registered: May 2004
Location: Norway
Distribution: SuSE 8.2
Posts: 5
Rep:
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
05-24-2004, 11:27 AM
#2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,077
Did you compile the kernel 2 times or maybe you set the wrong EXTRAVERSION parameter in Makefile from kernel source tree.
05-24-2004, 01:05 PM
#3
LQ Newbie
Registered: May 2004
Location: Norway
Distribution: SuSE 8.2
Posts: 5
Original Poster
Rep:
I did not compile the kernel at all. Do I have to do that in order to
build an installable module??? :-)
05-24-2004, 02:08 PM
#4
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,077
No lol, I asked this because the difference between kernel names.
And what output does the uname -r give ?
05-25-2004, 03:11 AM
#5
LQ Newbie
Registered: May 2004
Location: Norway
Distribution: SuSE 8.2
Posts: 5
Original Poster
Rep:
2.4.20-4GB-athlon.....
05-25-2004, 07:45 AM
#6
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,077
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
05-25-2004, 08:37 AM
#7
LQ Newbie
Registered: May 2004
Location: Norway
Distribution: SuSE 8.2
Posts: 5
Original Poster
Rep:
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.
05-25-2004, 11:55 AM
#8
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,077
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
05-26-2004, 09:11 AM
#9
LQ Newbie
Registered: May 2004
Location: Norway
Distribution: SuSE 8.2
Posts: 5
Original Poster
Rep:
That's it. Thanks :-)
Back to curses......
All times are GMT -5. The time now is 01:06 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News