[139] in linux-net channel archive
SLIP/CSLIP module, kernel panic, kernel configuration
daemon@ATHENA.MIT.EDU (Andreas Haumer)
Tue Mar 21 09:27:25 1995
Date: Tue, 21 Mar 95 09:20 MET
From: andreas@vlsivie.tuwien.ac.at (Andreas Haumer)
To: linux-net@vger.rutgers.edu
Cc: andreas@vlsivie.tuwien.ac.at
Hi!
(This was originally posted to the linux-kernel list, but I got no answer
for 9 hours now, so I'm posting this to linux-net also)
(This is a two-part error report with a proposal for a modification in the
kernel configuration scripts. Sorry, but this is rather long.)
System: Linux-1.2.1, i386DX-33, 8MB Ram
Yesterday I was trying to connect to a slip-server with dip-3.3.7m using
CSLIP mode with SLIP kernel module. This was the first time I tried this
module.
The following shows what happened and the interesting parts from
/var/adm/sysdebug:
First, "dip" tried to connect to the server.
> Mar 19 18:27:05 gatekeeper dip[513]: DIP: tty_open: /dev/ttys3 (4)
> Mar 19 18:27:05 gatekeeper dip[513]: waiting for "OK" for 2 sec's.
> Mar 19 18:27:24 gatekeeper dip[513]: waiting for "ogin:" for 10 sec's.
> Mar 19 18:27:24 gatekeeper dip[513]: waiting for "word:" for 10 sec's.
> Mar 19 18:27:25 gatekeeper dip[513]: waiting for "type:" for 10 sec's.
> Mar 19 18:27:25 gatekeeper dip[513]: waiting for "obelix:" for 10 sec's.
> Mar 19 18:27:26 gatekeeper dip[515]: tty_notlocal: fd0: /dev/ttyp0 fd4 /dev/ttys3
After successful connecting to the server, the script wanted to set CSLIP
mode:
> Mar 19 18:27:26 gatekeeper dip[515]: cslip: set_disc N_SLIP (1)
This didn't work due to the following error:
> Mar 19 18:27:26 gatekeeper dip[515]: SET_ENCAP(VJ_COMP=1): Invalid argument
Apparently, the kernel didn't understand CSLIP header compression!
> Mar 19 18:27:39 gatekeeper dip[515]: >>> DETACH "/sbin/ifconfig down"
> Mar 19 18:27:40 gatekeeper dip[515]: root down CSLIP link to remote w.x.y.z/w.x.y.z
> Mar 19 18:27:43 gatekeeper dip[515]: DIP: tty: set_state: I/O error
> Mar 19 18:27:43 gatekeeper dip[515]: DIP: tty: hangup(RAISE): I/O error
> Mar 19 18:27:45 gatekeeper dip[515]: DIP: Probably line disconnected!
> Mar 19 18:27:45 gatekeeper dip[515]: DIP: tty_puts: failed to write to tty (I/O error)...
> Mar 19 18:27:48 gatekeeper dip[515]: DIP: Probably line disconnected!
> Mar 19 18:27:48 gatekeeper dip[515]: DIP: tty_puts: failed to write to tty (I/O error)...
Ok, I then terminated the still running dip process (pid 515) with "dip -k".
To further investigate he problem I tried to remove the SLIP Module from the
kernel with "rmmod" but immediately got the following (reproducable) kernel
panic:
> Mar 19 18:28:06 gatekeeper kernel: unregister_netdev: device 'sl0' busy
> Mar 19 18:28:06 gatekeeper kernel: unregister_netdev: device 'sl1' unlinked
> Mar 19 18:28:06 gatekeeper kernel: unregister_netdev: device 'sl2' unlinked
> Mar 19 18:28:06 gatekeeper kernel: unregister_netdev: device 'sl3' unlinked
> Mar 19 18:28:06 gatekeeper kernel: Unable to handle kernel paging request at virtual address c100c370
> Mar 19 18:28:06 gatekeeper kernel: current->tss.cr3 = 00493000, ^Ir3 = 00493000
> Mar 19 18:28:06 gatekeeper kernel: *pde = 0009e067
> Mar 19 18:28:06 gatekeeper kernel: *pte = 00000000
> Mar 19 18:28:06 gatekeeper kernel: Oops: 0000
> Mar 19 18:28:06 gatekeeper kernel: EIP: 0010:0014411c
> Mar 19 18:28:06 gatekeeper kernel: EFLAGS: 00010206
> Mar 19 18:28:06 gatekeeper kernel: eax: 02000000 ebx: 03000000 ecx: 1f000000 edx: 0100c33c
> Mar 19 18:28:06 gatekeeper kernel: esi: 020101c9 edi: ff000000 ebp: 00ffffff esp: 00094dd4
> Mar 19 18:28:06 gatekeeper kernel: ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
> Mar 19 18:28:06 gatekeeper kernel: Process in.telnetd (pid: 480, process nr: 24, stackpage=00094000)
> Mar 19 18:28:06 gatekeeper kernel: Stack: 0067e018 0067e018 00000000 001a2d9c 02000000 ff000000 00139aa9 020101c9
> Mar 19 18:28:06 gatekeeper kernel: 0067e070 0067e018 00000000 001a2d9c bffff000 005cadd8 002feffc 0011068d
> Mar 19 18:28:06 gatekeeper kernel: 00000002 0013db18 0066360c 00000004 00000004 00134f8d 0067e070 020101c9
> Mar 19 18:28:06 gatekeeper kernel: Call Trace: 00139aa9 0011068d 0013db18 00134f8d 010101c9 001353f3 0013bc5c
> Mar 19 18:28:06 gatekeeper kernel: 0013ddb8 0013e023 010101c9 0013eb03 00145959 00145994 00132b68 00125584
> Mar 19 18:28:06 gatekeeper kernel: 00110709 0011002b
> Mar 19 18:28:06 gatekeeper kernel: Code: f6 42 34 01 74 54 83 7a 54 00 74 c0 39 72 54 74 bb f6 42 34
EIP points to somewhere between:
001440ac T _udp_recvfrom
0014416c T _udp_read
Note the log entry from "unregister_netdev:" saying "device 'sl0' busy"!
Now there are actually two problems:
1.) To configure SLIP as loadable module, I had to say "n" to the appropriate
question when doing "make config".
With the present "Configure" script this automatically disables the
CONFIG_SLIP_COMPRESSED and SL_SLIP_LOTS features. Without changing
the script, one can't use CSLIP together with a loadable slip module yet.
2.) After this error condition, removing the slip module leads to a kernel
panic in udp_recvfrom!
It seems, the network code got somewhat inconsistent.
Though this was following an error condition, I don't think it should
be possible for a user level program to cause a kernel panic :-)
Now I think I have at least found a solution to problem #1.
Here's the proposal:
We could change the "Configure" script to allow specific answers for module
support. The user then can choose between "y" (= compile feature into kernel),
"m" (= compile feature as loadable module) and "n" (= don't compile feature
at all). The defines in ".config" can then look like:
> #
> # Network device support
> #
> CONFIG_NETDEVICES=y
> CONFIG_DUMMY=m
> CONFIG_SLIP=m
> CONFIG_SLIP_COMPRESSED=y
> # SL_SLIP_LOTS is not set
> CONFIG_PPP=m
> CONFIG_PLIP=m
> # CONFIG_NET_ALPHA is not set
> CONFIG_NET_VENDOR_SMC=y
> # CONFIG_WD80x3 is not set
> CONFIG_ULTRA=y
> # CONFIG_LANCE is not set
> CONFIG_NET_VENDOR_3COM=y
> CONFIG_EL1=m
> # CONFIG_EL2 is not set
> CONFIG_EL3=m
> # CONFIG_NET_ISA is not set
> # CONFIG_NET_EISA is not set
> # CONFIG_NET_POCKET is not set
In the "config.in" script we now can tell whether the user wants the feature
in the kernel, as loadable module or doesn't want it at all and act
accordingly.
Of course this means we have to change the corresponding Makefile entries to
support the new "m" define.
I also changed the functions in "Configure" to display the possible choices
when asking for configuration values together with the present default value.
I didn't change the entries in "autoconf.h" in order not to cause troubles
in the kernel sources (i.e. answers "n" and "m" still produce "#undef" entries
in the header-file). Maybe in the future we can also use "m" defined pre-
processor macros?
I tried this concept with the Linux net drivers (in order to compile slip
modules with CSLIP support) and it worked fine.
There are some pros:
a) When configuring the kernel, the user now can see which feature is
supported as loadable module and explicitly choose it.
b) Problems like the SLIP/CSLIP one are gone because we now can exactly
distinguish whether the user wants a module or doesn't want this feature.
c) Unwanted features don't get compiled anymore. This saves some time.
And here are some cons:
a) There is some work to do in order to introduce this new concept (changing
all the Makefiles)
b) Maybe there are some dependencies in the kernel sources we must not forget.
So, this is it. Thank you for your attention :-)
Any comments?
- andreas
PS: I still can't say what caused the kernel panic ;-(
Here are the files I have changed in order to implement this idea. (I did
it just for the net-drivers yet)
-- /usr/src/linux/Configure --------------------------------------------------
#! /bin/sh
#
# This script is used to configure the linux kernel.
#
# It was inspired by the challenge in the original Configure script
# to ``do something better'', combined with the actual need to ``do
# something better'' because the old configure script wasn't flexible
# enough.
#
# Please send comments / questions / bug fixes to raymondc@microsoft.com.
#
# Each line in the config file is a command.
#
# 050793 - use IFS='@' to get around a bug in a pre-version of bash-1.13
# with an empty IFS.
#
# Make sure we're really running bash.
#
# I would really have preferred to write this script in a language with
# better string handling, but alas, bash is the only scripting language
# that I can be reasonable sure everybody has on their linux machine.
#
[ -z "$BASH" ] && { echo "Configure requires bash" 1>&2; exit 1; }
# Disable filename globbing once and for all.
# Enable function cacheing.
set -f -h
#
# readln reads a line into $ans.
#
# readln prompt default
#
function readln () {
if [ "$DEFAULT" = "-d" ]; then
echo "$1"
ans=$2
else
echo -n "$1"
IFS='@' read ans </dev/tty || exit 1
[ -z "$ans" ] && ans=$2
fi
}
#
# comment does some pretty-printing
#
# comment 'xxx'
#
function comment () {
echo "*"; echo "* $1" ; echo "*"
(echo "" ; echo "#"; echo "# $1" ; echo "#") >>$CONFIG
(echo "" ; echo "/*"; echo " * $1" ; echo " */") >>$CONFIG_H
}
#
# bool processes a boolean argument
#
# bool question define default
#
function bool () {
ans=""
def=$(eval echo "\${$2:-$3}")
while [ "$ans" != "y" -a "$ans" != "n" ]; do
case "$def" in
y) readln "$1 ($2) [Y/n] " "$def" ;;
n) readln "$1 ($2) [y/N] " "$def"
esac
done
if [ "$ans" = "y" ]; then
echo "$2=y" >>$CONFIG
echo "#define $2 1" >>$CONFIG_H
else
echo "# $2 is not set" >>$CONFIG
echo "#undef $2" >>$CONFIG_H
fi
eval "$2=$ans"
}
#
# module processes a kernel feature with module support
# possible answers:
# 'y' ... compile feature into kernel
# 'm' ... compile feature as loadable module
# 'n' ... don't compile feature at all
#
# Syntax: module question define default
#
function module () {
ans=""
def=$(eval echo "\${$2:-$3}")
while [ "$ans" != "y" -a "$ans" != "m" -a "$ans" != "n" ]; do
case "$def" in
y) readln "$1 ($2) [Y/m/n] " "$def" ;;
m) readln "$1 ($2) [y/M/n] " "$def" ;;
n) readln "$1 ($2) [y/m/N] " "$def"
esac
done
if [ "$ans" = "n" ]; then
echo "# $2 is not set" >>$CONFIG
echo "#undef $2" >>$CONFIG_H
else
echo "$2=$ans" >>$CONFIG
# this is to ensure compatibility with old version of "Configure"
# maybe we can use a "m" defined macro in the future?
if [ "$ans" = "y" ]; then
echo "#define $2 1" >>$CONFIG_H
fi
fi
eval "$2=$ans"
}
#
# int processes an integer argument
#
# int question define default
#
function int () {
# Slimier hack to get bash to rescan a line.
ans="x"
def=$(eval echo "\${$2:-$3}")
while [ $[$ans+0] != "$ans" ]; do
readln "$1 ($2) [$def] " "$def"
done
echo "$2=$ans" >>$CONFIG
echo "#define $2 ($ans)" >>$CONFIG_H
eval "$2=$ans"
}
CONFIG=.tmpconfig
CONFIG_H=.tmpconfig.h
trap "rm -f $CONFIG $CONFIG_H ; exit 1" 1 2
#
# Make sure we start out with a clean slate.
#
echo "#" > $CONFIG
echo "# Automatically generated make config: don't edit" >> $CONFIG
echo "#" >> $CONFIG
echo "/*" > $CONFIG_H
echo " * Automatically generated C config: don't edit" >> $CONFIG_H
echo " */" >> $CONFIG_H
DEFAULT=""
if [ "$1" = "-d" ] ; then
DEFAULT="-d"
shift
fi
CONFIG_IN=./config.in
if [ "$1" != "" ] ; then
CONFIG_IN=$1
fi
if [ -f ./.config ] ; then
. ./.config
sed -e 's/# \(.*\) is not.*/\1=n/' <./.config >/tmp/conf.$$
. /tmp/conf.$$
rm /tmp/conf.$$
fi
. $CONFIG_IN
if [ "$CONFIG_SOUND" = "y" ] ; then
$MAKE -C drivers/sound config || exit 1
fi
rm -f .config.old
if [ -f .config ]; then
mv .config .config.old
fi
mv .tmpconfig .config
mv .tmpconfig.h include/linux/autoconf.h
echo
echo "The linux kernel is now hopefully configured for your setup."
echo "Check the top-level Makefile for additional configuration,"
echo "and do a 'make dep ; make clean' if you want to be sure all"
echo "the files are correctly re-made"
echo
exit 0
-- End of /usr/src/linux/Configure -------------------------------------------
-- part of /usr/src/linux/arch/i386/config.in --------------------------------
if [ "$CONFIG_NET" = "y" ]; then
comment 'Network device support'
bool 'Network device support?' CONFIG_NETDEVICES y
if [ "$CONFIG_NETDEVICES" = "n" ]; then
comment 'Skipping network driver configuration options...'
else
module 'Dummy net driver support' CONFIG_DUMMY y
module 'SLIP (serial line) support' CONFIG_SLIP n
if [ "$CONFIG_SLIP" = "y" -o "$CONFIG_SLIP" = "m" ]; then
bool ' CSLIP compressed headers' CONFIG_SLIP_COMPRESSED y
bool ' 16 channels instead of 4' SL_SLIP_LOTS n
# bool ' SLIP debugging on' SL_DUMP y
fi
module 'PPP (point-to-point) support' CONFIG_PPP n
module 'PLIP (parallel port) support' CONFIG_PLIP n
bool 'Do you want to be offered ALPHA test drivers' CONFIG_NET_ALPHA n
bool 'Western Digital/SMC cards' CONFIG_NET_VENDOR_SMC n
if [ "$CONFIG_NET_VENDOR_SMC" = "y" ]; then
bool 'WD80*3 support' CONFIG_WD80x3 n
bool 'SMC Ultra support' CONFIG_ULTRA n
fi
bool 'AMD LANCE and PCnet (AT1500 and NE2100) support' CONFIG_LANCE n
bool '3COM cards' CONFIG_NET_VENDOR_3COM y
if [ "$CONFIG_NET_VENDOR_3COM" = "y" ]; then
module '3c501 support' CONFIG_EL1 n
bool '3c503 support' CONFIG_EL2 n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
bool '3c505 support' CONFIG_ELPLUS n
bool '3c507 support' CONFIG_EL16 n
fi
module '3c509/3c579 support' CONFIG_EL3 y
fi
bool 'Other ISA cards' CONFIG_NET_ISA n
if [ "$CONFIG_NET_ISA" = "y" ]; then
bool 'Cabletron E21xx support' CONFIG_E2100 n
module 'DEPCA support' CONFIG_DEPCA n
module 'EtherWorks 3 support' CONFIG_EWRK3 n
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
module 'Arcnet support' CONFIG_ARCNET n
bool 'AT1700 support' CONFIG_AT1700 n
# bool 'EtherExpressPro support' CONFIG_EEXPRESS_PRO n
module 'EtherExpress support' CONFIG_EEXPRESS n
bool 'NI5210 support' CONFIG_NI52 n
bool 'NI6510 support' CONFIG_NI65 n
module 'WaveLAN support' CONFIG_WAVELAN n
fi
bool 'HP PCLAN+ (27247B and 27252A) support' CONFIG_HPLAN_PLUS n
bool 'HP PCLAN (27245 and other 27xxx series) support' CONFIG_HPLAN n
bool 'NE2000/NE1000 support' CONFIG_NE2000 y
bool 'SK_G16 support' CONFIG_SK_G16 n
fi
bool 'EISA, VLB, PCI and on board controllers' CONFIG_NET_EISA n
if [ "$CONFIG_NET_EISA" = "y" ]; then
if [ "$CONFIG_NET_ALPHA" = "y" ]; then
bool 'Ansel Communications EISA 3200 support' CONFIG_AC3200 n
fi
module 'Apricot Xen-II on board ethernet' CONFIG_APRICOT n
module 'DE425, DE434, DE435 support' CONFIG_DE4X5 n
# bool 'DEC 21040 PCI support' CONFIG_DEC_ELCP n
# bool 'LPL T100V 100Mbs support' CONFIG_LPL_T100 n
# bool 'PCnet32 (32 bit VLB and PCI LANCE) support' CONFIG_PCNET32 n
bool 'Zenith Z-Note support' CONFIG_ZNET y
fi
bool 'Pocket and portable adaptors' CONFIG_NET_POCKET n
if [ "$CONFIG_NET_POCKET" = "y" ]; then
bool 'AT-LAN-TEC/RealTek pocket adaptor support' CONFIG_ATP n
module 'D-Link DE600 pocket adaptor support' CONFIG_DE600 n
module 'D-Link DE620 pocket adaptor support' CONFIG_DE620 n
# bool 'Silicom pocket adaptor support' CONFIG_SILICOM_PEA n
# bool 'WaveLAN PCMCIA support' CONFIG_WaveLAN n
# bool '3 Com 3c589 PCMCIA support' CONFIG_3C589 n
fi
fi
fi
-- End of part of /usr/src/linux/arch/i386/config.in --------------------------
-- /usr/src/linux/drivers/net/Makefile ----------------------------------------
# File: drivers/net/Makefile
#
# Makefile for the Linux network (ethercard) device drivers.
#
# This will go away in some future future: hidden configuration files
# are difficult for users to deal with.
include CONFIG
# Build MODULES by appending to this string for every driver below
MODULES :=
NETDRV_OBJS := Space.o auto_irq.o net_init.o loopback.o
CFLAGS := $(CFLAGS) -I../../net/inet
CPP := $(CPP) -I../../net/inet
.c.o:
$(CC) $(CFLAGS) -c $<
# The point of the makefile...
all: net.a
Space.o: Space.c ../../include/linux/autoconf.h
$(CC) $(CFLAGS) $(OPTS) -c $<
net_init.o: ../../include/linux/autoconf.h
ifdef CONFIG_SK_G16
NETDRV_OBJS := $(NETDRV_OBJS) sk_g16.o
endif
ifdef CONFIG_WD80x3
NETDRV_OBJS := $(NETDRV_OBJS) wd.o
CONFIG_8390 = y
endif
wd.o: wd.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(WD_OPTS) -c $<
ifdef CONFIG_EL2
NETDRV_OBJS := $(NETDRV_OBJS) 3c503.o
CONFIG_8390 = y
endif
3c503.o: 3c503.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(EL2_OPTS) -c $<
ifdef CONFIG_NE2000
NETDRV_OBJS := $(NETDRV_OBJS) ne.o
CONFIG_8390 = y
endif
ne.o: ne.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(NE_OPTS) -c $<
ifdef CONFIG_HPLAN
NETDRV_OBJS := $(NETDRV_OBJS) hp.o
CONFIG_8390 = y
endif
hp.o: hp.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(HP_OPTS) -c $<
ifdef CONFIG_HPLAN_PLUS
NETDRV_OBJS := $(NETDRV_OBJS) hp-plus.o
CONFIG_8390 = y
endif
ifdef CONFIG_ULTRA
NETDRV_OBJS := $(NETDRV_OBJS) smc-ultra.o
CONFIG_8390 = y
endif
ifdef CONFIG_E2100
NETDRV_OBJS := $(NETDRV_OBJS) e2100.o
CONFIG_8390 = y
endif
ifeq ("$(CONFIG_PLIP)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) plip.o
else
ifeq ("$(CONFIG_PLIP)", "m")
MODULES := $(MODULES) plip.o
endif
endif
plip.o: plip.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(PLIP_OPTS) -c $<
ifeq ("$(CONFIG_PPP)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) ppp.o
CONFIG_SLHC = y
else
ifeq ("$(CONFIG_PPP)", "m")
MODULES := $(MODULES) ppp.o
CONFIG_SLHC = m
endif
endif
ifeq ("$(CONFIG_SLIP)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) slip.o
CONFIG_SLHC = y
else
ifeq ("$(CONFIG_SLIP)", "m")
MODULES := $(MODULES) slip.o
CONFIG_SLHC = m
endif
endif
slip.o: slip.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
ifdef CONFIG_DE650
NETDRV_OBJS := $(NETDRV_OBJS) de650.o
CONFIG_8390 = y
endif
ifdef CONFIG_3C589
NETDRV_OBJS := $(NETDRV_OBJS) 3c589.o
endif
ifeq ("$(CONFIG_DUMMY)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) dummy.o
else
ifeq ("$(CONFIG_DUMMY)", "m")
MODULES := $(MODULES) dummy.o
endif
endif
dummy.o: dummy.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) -c $<
ifeq ("$(CONFIG_DE600)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) de600.o
else
ifeq ("$(CONFIG_DE600)", "m")
MODULES := $(MODULES) de600.o
endif
endif
de600.o: de600.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(DE600_OPTS) -c $<
ifeq ("$(CONFIG_DE620)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) de620.o
else
ifeq ("$(CONFIG_DE620)", "m")
MODULES := $(MODULES) de620.o
endif
endif
de620.o: de620.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(DE620_OPTS) -c $<
ifdef CONFIG_AT1500
NETDRV_OBJS := $(NETDRV_OBJS) lance.o
endif
ifdef CONFIG_LANCE
NETDRV_OBJS := $(NETDRV_OBJS) lance.o
endif
ifdef CONFIG_AT1700
NETDRV_OBJS := $(NETDRV_OBJS) at1700.o
endif
ifeq ("$(CONFIG_EL1)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) 3c501.o
else
ifeq ("$(CONFIG_EL1)", "m")
MODULES := $(MODULES) 3c501.o
endif
endif
ifdef CONFIG_EL16
NETDRV_OBJS := $(NETDRV_OBJS) 3c507.o
endif
ifeq ("$(CONFIG_EL3)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) 3c509.o
else
ifeq ("$(CONFIG_EL3)", "m")
MODULES := $(MODULES) 3c509.o
endif
endif
ifeq ("$(CONFIG_EEXPRESS)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) eexpress.o
else
ifeq ("$(CONFIG_EEXPRESS)", "m")
MODULES := $(MODULES) eexpress.o
endif
endif
ifeq ("$(CONFIG_WAVELAN)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) wavelan.o
else
ifeq ("$(CONFIG_WAVELAN)", "m")
MODULES := $(MODULES) wavelan.o
endif
endif
ifdef CONFIG_ZNET
NETDRV_OBJS := $(NETDRV_OBJS) znet.o
endif
ifeq ("$(CONFIG_DEPCA)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) depca.o
else
ifeq ("$(CONFIG_DEPCA)", "m")
MODULES := $(MODULES) depca.o
endif
endif
depca.o: depca.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEPCA_OPTS) -c $<
ifeq ("$(CONFIG_EWRK3)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) ewrk3.o
else
ifeq ("$(CONFIG_EWRK3)", "m")
MODULES := $(MODULES) ewrk3.o
endif
endif
ewrk3.o: ewrk3.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(EWRK3_OPTS) -c $<
ifdef CONFIG_ATP
NETDRV_OBJS := $(NETDRV_OBJS) atp.o
endif
ifeq ("$(CONFIG_DE4X5)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) de4x5.o
else
ifeq ("$(CONFIG_DE4X5)", "m")
MODULES := $(MODULES) de4x5.o
endif
endif
de4x5.o: de4x5.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(DE4x5_OPTS) -c $<
ifdef CONFIG_NI52
NETDRV_OBJS := $(NETDRV_OBJS) ni52.o
endif
ifdef CONFIG_NI65
NETDRV_OBJS := $(NETDRV_OBJS) ni65.o
endif
ifdef CONFIG_ELPLUS
NETDRV_OBJS := $(NETDRV_OBJS) 3c505.o
endif
ifdef CONFIG_AC3200
NETDRV_OBJS := $(NETDRV_OBJS) ac3200.o
CONFIG_8390 = y
endif
ifeq ("$(CONFIG_APRICOT)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) apricot.o
else
ifeq ("$(CONFIG_APRICOT)", "m")
MODULES := $(MODULES) apricot.o
endif
endif
ifdef CONFIG_DEC_ELCP
NETDRV_OBJS := $(NETDRV_OBJS) tulip.o
endif
ifeq ("$(CONFIG_ARCNET)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) arcnet.o
else
ifeq ("$(CONFIG_APRICOT)", "m")
MODULES := $(MODULES) arcnet.o
endif
endif
ifdef CONFIG_PI
NETDRV_OBJS := $(NETDRV_OBJS) pi2.o
CONFIG_PI = CONFIG_PI
endif
pi2.o: pi2.c CONFIG
$(CC) $(CPPFLAGS) $(CFLAGS) $(PI_OPTS) -c $<
ifeq ("$(CONFIG_SLHC)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) slhc.o
else
ifeq ("$(CONFIG_SLHC)", "m")
MODULES := slhc.o $(MODULES)
endif
endif
ifeq ("$(CONFIG_8390)", "y")
NETDRV_OBJS := $(NETDRV_OBJS) 8390.o
else
ifeq ("$(CONFIG_8390)", "m")
MODULES := 8390.o $(MODULES)
endif
endif
net.a: $(NETDRV_OBJS)
rm -f net.a
$(AR) rcs net.a $(NETDRV_OBJS)
clean:
rm -f core *.o *.a *.s
dep:
$(CPP) -M $(NETDRV_OBJS:.o=.c) > .depend
ifdef MODULES
$(CPP) -M -DMODULE $(MODULES:.o=.c) >> .depend
endif
tar:
ifdef MODULES
modules: $(MODULES)
echo $(MODULES) > ../../modules/NET_MODULES
cd ../../modules; \
for i in $(MODULES); do ln -sf ../drivers/net/$$i .; done
else
modules:
endif
# include a dependency file if one exists
ifeq (.depend,$(wildcard .depend))
include .depend
endif
-- End of /usr/src/linux/drivers/net/Makefile --------------------------------
--
In your head, in your head
Zombie
What's in your head, in your head?
Zombie!
"Zombie", The Cranberries
Gewidmet allen Faschisten und Bombenlegern - aus gegebenen Anlass.
----------------------+-------------------------------+------------------------
andreas haumer | phone: +43.1.6001508 |
buchengasse 67/8 | fax: +43.1.6001084 |
a-1100 vienna | e-mail: | god is real -
austria | andreas@vlsivie.tuwien.ac.at | unless declared integer