[tulip] tulip v0.93 (11/7/01) problems for DS21140 quad card under RH 2.2.19 (problem solved)

Gregg Graubins gregg@wwti.com
Sun Jan 20 15:21:01 2002


This is a multi-part message in MIME format.

------=_NextPart_000_0001_01C1A1BD.D7C77AF0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

(This just an email to the mailing list for those who may have a similar
problem in the future - Give this a shot [archival purposes])

> Greetings,
>
> I'm having a problem compiling the tulip module drivers into my 2.2.19

> kernel. I have RedHat 7.1 installed and am downgrading the kernel to 
> 2.2.19. Per the instructions, I downloaded the individual driver file 
> (tulip.c), pci-scan.c, pci-scan.h, and kern_compat.h and placed them 
> in my kernel drivers/net directory and recompiled without any errors.
>
> BTW, I placed tulip.o and pci-scan.o in the modules directory 
> (/lib/modules/2.2.19/net).
>
> The problem I'm having is upon trying to load the module (insmod). 
> It's giving some unresolved symbol errors, as shown here:
>
>
========================================================================
===
> [root@freedom net]# insmod -v tulip.o
> Using tulip.o
> Symbol version prefix 'smp_'
> tulip.o: unresolved symbol pci_drv_unregister
> tulip.o: unresolved symbol pci_drv_register
>
========================================================================
===
>
> These are found in pci-scan.c... I don't have a whole lot of 
> experience with modules, but I also tried:
>
>
========================================================================
===
> [root@freedom net]# insmod -v pci-scan.o
> Using pci-scan.o
> Symbol version prefix 'smp_'
> pci-scan.o: kernel-module version mismatch
> pci-scan.o was compiled for kernel version 2.2.16-22
> while this kernel is version 2.2.19.
>
> [root@freedom net]# insmod -f -v pci-scan.o
> Using pci-scan.o
> Symbol version prefix 'smp_'
> Warning: kernel-module version mismatch
> pci-scan.o was compiled for kernel version 2.2.16-22
> while this kernel is version 2.2.19
> pci-scan.o: unresolved symbol __ioremap_R9eac042a
> pci-scan.o: unresolved symbol pci_find_class_R6c460806
> pci-scan.o: unresolved symbol pci_write_config_word_Rd9cc3b03
> pci-scan.o: unresolved symbol pci_write_config_dword_Rf0fbd200
> pci-scan.o: unresolved symbol pci_read_config_dword_R2ca7e89f
> pci-scan.o: unresolved symbol pci_read_config_byte_Re5ceea13
> pci-scan.o: unresolved symbol pci_write_config_byte_Re84d5397
> pci-scan.o: unresolved symbol check_region_R522f4d72
> pci-scan.o: unresolved symbol pci_set_master_R040f6432
> pci-scan.o: unresolved symbol printk_R1b7d4074
> pci-scan.o: unresolved symbol pci_read_config_word_R8764d15f
>
========================================================================
===
>
> I did notice the report about the kernel version above, but that 
> shouldn't have any affect on trying to load the module, right?
>
> I also tried compiling the tulip drivers without having it load as a 
> module (monolithically) and it still doesn't work.
>
> FYI - The tulip module drivers with the 2.4.2-2 kernel that comes with

> RH 7.1 works just fine.

I checked into this a little more and found out that there was a problem
with my command line args while compiling the modules. I [originally]
followed the procedure at http://www.scyld.com/network/updates.html (and
failed):

> Compile both the driver file and pci-scan.c using the compile-command
at the bottom of the source files. If a compile-command is not there use
the following compile command: 
> gcc -DMODULE -D__KERNEL__ -O6 -c driver.c
> gcc -DMODULE -D__KERNEL__ -O6 -c pci-scan.c
> With some distributions, especially those based on the 2.4 kernel,
> you may need to add the following options to the compile command
>    -I/usr/src/linux/include -include
/usr/src/linux/include/linux/modversions.h

Of course this was while I was under RH 7.1 2.4.2 I believe. The problem
_might_ have been the gcc version (2.96 20000731 (Red Hat Linux 7.1
2.96-85)) I was trying to compile with. It should have been kgcc
(However, I think I remember trying kgcc and that was still stubborn).

In any case, I compiled using gcc while under a 2.2.19 kernel with the
attached Makefile and it worked just fine when compiling v0.93.

===
Gregg Graubins <gregg@wwti.com>
(PGP key available)

------=_NextPart_000_0001_01C1A1BD.D7C77AF0
Content-Type: application/octet-stream;
	name="Makefile"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Makefile"

CC =3D gcc=0A=
OPTIONSCOMMON =3D -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=3D2 =
-march=3Di686 -DMODVERSIONS  -include =
/usr/src/linux/include/linux/modversions.h=0A=
OPTIONSTULIP =3D $(OPTIONSCOMMON)=0A=
OPTIONSPCISN =3D $(OPTIONSCOMMON)  -DEXPORT_SYMTAB=0A=
=0A=
all:=0A=
	$(CC) $(OPTIONSTULIP) -c tulip.c=0A=
	$(CC) $(OPTIONSPCISN) -c pci-scan.c=0A=
=0A=
clean:=0A=
	rm -f *~ pci-scan.o tulip.o=0A=

------=_NextPart_000_0001_01C1A1BD.D7C77AF0--