Compile tulip driver into monolithic kernel?
"John Sutton" <[email protected]> Sat, 5 Jul 2003 19:47:49 +0100 (BST)
| Newsgroups | gmane.linux.drivers.tulip.general |
|---|---|
| Message-ID | <[email protected]> |
Hi there
I'm trying to upgrade my system (disked server, multiple diskless clients,
all booting the *same* kernel) from kernel 2.2.19 to 2.4.18 and am having
problems. I'm using a stock 2.4.18 kernel with the tulip driver (version
0.9.15-pre9) compiled into the kernel. I can't compile it as a module
because I'm booting diskless clients.
Problem is, immediately after mounting the root over NFS, the system
hangs... Exactly the same kernel (which also has the eepro100 driver
built in) booting a client with an eepro card works fine, so I'm pretty
sure it is the tulip driver that is the problem. But this driver on the
server works fine. So the pathology is: driver works fine EXCEPT when
used in a diskless client.
I've seen mention of exactly this same problem on the NFS mailing list,
but no solution...
Any ideas?
I've downloaded netdrivers-3.4.tgz to try the latest driver. Problem is,
this driver (version v0.96) has no obvious relationship to 0.9.15-pre9!
The latter comes in it's own directory i.e. drivers/net/tulip and is split
up into 9 files (21142.c eeprom.c pnic2.c timer.c tulip.h interrupt.c
media.c pnic.c tulip_core.c) whereas the latest is just one big file
called tulip.c. What is this all about?
Anyway, I have succeeded in compiling the latest driver as a module by:
1) copying tulip.c, kern_compat.h, pci-scan.c and pci-scan.h to drivers/net
2) patching drivers/net/Makefile thus:
--- Makefile.orig Mon Feb 25 19:37:59 2002
+++ Makefile Sat Jul 5 19:38:54 2003
@@ -18,11 +18,11 @@
export-objs := 8390.o arlan.o aironet4500_core.o
aironet4500_card.o \
ppp_async.o ppp_generic.o slhc.o pppox.o auto_irq.o \
- net_init.o mii.o
+ net_init.o mii.o pci-scan.o
list-multi := rcpci.o
rcpci-objs := rcpci45.o rclanmtl.o
-ifeq ($(CONFIG_TULIP),y)
- obj-y += tulip/tulip.o
-endif
+obj-m += tulip.o pci-scan.o
+
+# WON'T WORK ;-( obj-$(CONFIG_TULIP) += tulip.o pci-scan.o
ifeq ($(CONFIG_ISDN_PPP),y)
@@ -32,5 +32,4 @@
subdir-$(CONFIG_NET_PCMCIA) += pcmcia
subdir-$(CONFIG_NET_WIRELESS) += wireless
-subdir-$(CONFIG_TULIP) += tulip
subdir-$(CONFIG_IRDA) += irda
subdir-$(CONFIG_TR) += tokenring
But I can't get it to compile into the kernel. If I change the Makefile
so that it reads:
obj-y += tulip.o pci-scan.o
then the compile of pci-scan.c fails (because of the absence of -DMODULE)
thus:
------------------------------------
gcc -D__KERNEL__ -I/usr/src/linux-2.4.18/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
-pipe -mpreferred-stack-boundary=2 -march=k6 -DKBUILD_BASENAME=pci_scan
-DEXPORT_SYMTAB -c pci-scan.c
In file included from /usr/src/linux-2.4.18/include/asm/io.h:46,
from /usr/src/linux-2.4.18/include/asm/pci.h:35,
from /usr/src/linux-2.4.18/include/linux/pci.h:610,
from pci-scan.c:67:
/usr/src/linux-2.4.18/include/linux/vmalloc.h: In function `vmalloc':
/usr/src/linux-2.4.18/include/linux/vmalloc.h:35: `boot_cpu_data'
undeclared (first use in this function)
/usr/src/linux-2.4.18/include/linux/vmalloc.h:35: (Each undeclared
identifier is reported only once
/usr/src/linux-2.4.18/include/linux/vmalloc.h:35: for each function it
appears in.)
/usr/src/linux-2.4.18/include/linux/vmalloc.h: In function `vmalloc_dma':
/usr/src/linux-2.4.18/include/linux/vmalloc.h:44: `boot_cpu_data'
undeclared (first use in this function)
/usr/src/linux-2.4.18/include/linux/vmalloc.h: In function `vmalloc_32':
/usr/src/linux-2.4.18/include/linux/vmalloc.h:53: `boot_cpu_data'
undeclared (first use in this function)
make[3]: *** [pci-scan.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.4.18/drivers/net'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.4.18/drivers/net'
make[1]: *** [_subdir_net] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.18/drivers'
make: *** [_dir_drivers] Error 2
--------------------------------------------
Any ideas gratefully received!
TIA
***************************************************
John Sutton
SCL Computer Services
URL http://www.scl.co.uk/
Tel. +44 (0) 1239 711888
***************************************************
_______________________________________________
tulip mailing list, [email protected]
To change to digest mode or unsubscribe visit
http://www.scyld.com/mailman/listinfo/tulip