[tulip] LinkSys LNE100TX v4.1 cards!

Donald Becker becker@scyld.com
Sun, 31 Dec 2000 23:25:03 -0500 (EST)


On Sun, 31 Dec 2000 scrapmetaldevil@home.com wrote:

> Okay here is the deal...I have gotten pci-scan and tulip to compile
> wonderfully under slakware 7.1. No problem...the kernel sources carry
> modversions.h and it takes seconds to install. However, using Debian I get
> the error, pci-scan and tulip will not compile with the 2.2.16 kernel
> sources installed. I get the error messages: pci-scan.c:56:
> linux/modversions.h: No such file or directory In file included from
> pci-scan.c:67: kern_compat.h:42: linux/modversions.h: No such file for
> directory

The modversions.h file is specific to the exact kernel you are running.  Not
just the kernel version, but also the options that it is compiled with.

> for debian. What am I missing here? I copied the modversions.h file from a
> 2.2.17 system just to see if it would at least find the file in

Copying the modversions.h file from another system will not work.

>.... The help file on the site says to 
> remove the -DMODVERSIONS flag from the compile command, but the funny
> thing is the compile command at the end of the pci-scan.c file does not
> use that flag! 

The drivers and "pci-scan.c" support file now use the following construct:

________________
#include <linux/config.h>
#if defined(MODULE) && defined(CONFIG_MODVERSIONS) && ! defined(MODVERSIONS)
#define MODVERSIONS
#endif
....
#if LINUX_VERSION_CODE < 0x20300  &&  defined(MODVERSIONS)
#include <linux/modversions.h>
#endif
________________

If CONFIG_MODVERSIONS is defined in your kernel configuration file, the
modversions.h file is automatically included.  This relies on both config.h
and modversions.h matching the kernel that you are compiling for.

Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993