[tulip] NC100 NIC card, tulip driver won't compile.

David Shochat shochat@acm.org
Thu, 23 Nov 2000 06:56:53 -0500


Phil Barone wrote:

> The -qpl displays many .o files in directory /lib/modules/2.2.16-22. 


Wrong RPM! The RPM I was talking about was:

kernel-source-2.2.16-22.i386.rpm
Note the word "source" in the name. Although based on the rest of your 
message, you must have already had it installed anyway.

> 
> Dont' know how to remove so tried the -i --force , got this:
> 
> depmod: ***unresolved symbols in /lib/modules/2.2.16-22/net/pci-scan.o


Also because of it being the wrong RPM. You're trying here to install 
the kernel module which will indeed try to put the compiled modules in 
there (including the bad tulip.o that doesn't work -- at least with my 
card and presumably yours).

> Anyway, I compiled pci-scan.c and tulip.c using the suggestion at end of
> each source file with these changes:
>   Used kgcc instead of gcc,
>     and
>   used the -I/usr/src/linux/include you suggested.
> 
> I Received a bunch of warning blah blah redifined and this is the 
> location
> of the previous definition messages but now have tulip.o and pci-scan.o
> 
> I did an insmod tulip.o and got 2 unresolved symbols 
> pci_drv_unregister and
> pci_drv_register. I don't suppose this is ok is it?
> 
> What do I do at this point?


You are very close now to success. Those symbols are defined by the 
pci-scan module. That simply means that it must be loaded before tulip. 
The best way to do it, however is to first do:
 depmod -a
(note: this always happens when you boot -- the message about "module 
dependencies")
That will build a file
//lib/modules//`uname -r`/modules.dep
which knows about things like the fact that tulip depends on pci-scan.
Now you can just say:
 modprobe tulip
This will cause modules.dep to be consulted and both modules will be 
loaded in the right order.

-- David