[tulip] Conexant LANfinity is working in 2.2 and 2.4!
Jens Arm
JArm@Webasto.de
Tue, 24 Jul 2001 15:33:01 +0200
Hi
<snip>
> > OPTIONSCOMMON = -D__KERNEL__ -DMODULE -Wall
> > -Wstrict-prototypes -O2 -I/usr/src/linux/include
> > -fomit-frame-pointer -fno-strict-aliasing
> > -Wno-trigraphs -fno-common -pipe
> > -mpreferred-stack-boundary=2 -march=i686 -DMODVERSIONS
> > -include /usr/src/linux/include/linux/modversions.h
>
> Ahhh, I suspect that "-DMODVERSIONS" is the critical option.
I have a kernel without MODVERSIONS defined (all new SuSE Kernel have this)
This is a kernel version 2.4.4.
The tulip.c I am able to compile with this command:
gcc -D__KERNEL__ -DMODULE -Wall -Wstrict-prototypes -O2
-I/usr/src/linux/include -fomit-frame-pointer -fno-strict-aliasing
-Wno-trigraphs -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -c
tulip.c
But with the pci-scan.c I fail. I get:
armj@linuxcvs:~/DownLoad > gcc -D__KERNEL__ -DMODULE -Wall
-Wstrict-prototypes -O2 -I/usr/src/linux/include -fomit-frame-pointer
-fno-strict-aliasing -Wno-trigraphs -fno-common -pipe
-mpreferred-stack-boundary=2 -march=i686 -DEXPORT_SYMTAB -c pci-scan.c
In file included from pci-scan.c:53:
/usr/src/linux/include/linux/module.h:21: linux/modversions.h: Datei oder
Verzeichnis nicht gefunden
The error, that modversions.h can not be found is IMHO OK, because the
modversions.h is only created by 'make dep' if the modversions-option in the
kernel-config is enabled.
This is the modules-config-section from autoconf.h
/*
* Loadable module support
*/
#define CONFIG_MODULES 1
#undef CONFIG_MODVERSIONS
#define CONFIG_KMOD 1
My question is now:
How can I compile the pci-scan.c if MODVERSIONS is disabled?
or must I compile a new kernel? :(
Any hints ???????
Secondary I get problems that some APM functions are not defined, but this
can I switch off by adding a undef CONFIG_APM in pci-scan.c. This is not the
best solution, but .... some error lesser
>
> I'll have to check out how to automatically add it to the 2.4 compile.
> Under 2.2 and earlier I did
>
> #if defined(CONFIG_MODVERSIONS) && defined(MODULE) && !
> defined(MODVERSIONS) #define MODVERSIONS
> #endif
> #include <linux/version.h>
> #include <linux/module.h>
> #if LINUX_VERSION_CODE < 0x20300 && defined(MODVERSIONS)
> #include <linux/modversions.h>
> #endif
>
> Does changing this to
> ...
> #if defined(MODVERSIONS) || defined(CONFIG_MODVERSIONS)
> ...
> allow dropping -DMODVERSIONS
<snip>
cu Jens