eepro100.c/RH6.0/SMP - compile error
Karl Schuster
AppliedArts@home.com
Tue May 25 20:35:15 1999
All,
I've got a Tyan mainboard (model S1836DLUAN) w/ onboard
10/100 Ethernet (chipset i82588). I got the driver from
(v1.05) from:
http://cesdis.gsfc.nasa.gov/linux/drivers/eepro100.c
My OS is RedHat 6.0 (ala Cheapbytes) and I've got dual
Pentium II 450s. I can get the driver to compile fine
in "non-SMP" mode (see below), but then I can't do an
insmod with the eepro100.o file. When use the compile
command from the bottom of the eepro100.c driver file,
I get the "undeclared" errors that you see below.
FWIW, I do have networking enabled under another 10/100
board (3COM 3C905B-TX FastEtherLink XL) that's plugged
into a PCI slot. The driver for it loaded just fine.
Any guidance would be appreciated.
Thanks,
Karl
================================================================
================================================================
======= Various results from different commands follow =========
================================================================
================================================================
[root]# make
gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall \
-Wstrict_prototypes -O6 -c eepro100.c \
`[ -f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS`
[root]# insmod eepro100.o
eepro100.o: kernel-module version mismatch
eepro100.o was compiled for kernel version 2.2.5-15
while this kernel is version 2.2.5-15smp.
[root]# uname -r
2.2.5-15smp
[root]# uname -a
Linux host.name.goes.here 2.2.5-15smp #1 SMP Mon Apr 19 22:43:28 EDT
1999 i686 unknown
[root]# make clean
rm -f *.o *.bak
[root]# make smp
gcc -D__SMP__ -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall \
-Wstrict_prototypes -O6 -c eepro100.c \
`[ -f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS`
/usr/include/asm/smp.h: In function `hard_smp_processor_id':
In file included from /usr/include/linux/smp.h:11,
from /usr/include/linux/sched.h:20,
from /usr/include/linux/mm.h:4,
from /usr/include/linux/slab.h:14,
from /usr/include/linux/malloc.h:4,
from eepro100.c:63:
/usr/include/asm/smp.h:209: warning: implicit declaration of function
`GET_APIC_ID`
/usr/include/asm/smp.h:209: `APIC_BASE' undeclared (first use in this
function)
/usr/include/asm/smp.h:209: (Each undeclared identifier is reported only
once
/usr/include/asm/smp.h:209: for each function it appears in.)
/usr/include/asm/smp.h:209: `APIC_ID' undeclared (first use in this
function)
make: *** [smp] Error 1
[root]# cat Makefile
eepro100.o : eepro100.c
gcc -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall \
-Wstrict_prototypes -O6 -c eepro100.c \
`[ -f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS`
smp :
gcc -D__SMP__ -DMODULE -D__KERNEL__ -I/usr/src/linux/net/inet -Wall \
-Wstrict_prototypes -O6 -c eepro100.c \
`[ -f /usr/include/linux/modversions.h ] && echo -DMODVERSIONS`
clean :
rm -f *.o *.bak