Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 2000 13:42:58 -0400
From:      "Sue Wainer" <wainer@sandgate.com>
To:        "Freebsd-Arch" <freebsd-arch@FreeBSD.ORG>
Subject:   Ethernet Device Driver Modules
Message-ID:  <NDBBLIBAPKIAHMINJJNFOENECCAA.wainer@sandgate.com>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C032C0.002A3690
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_000D_01C032C0.002A3690"


------=_NextPart_001_000D_01C032C0.002A3690
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

I am trying to create an Ethernet Device Driver Module that I can load with
kldload. I am assuming that the driver probe function will be entered when
the
module is loaded.
I have created a standard pci bus Ethernet driver, if_asic.c, modeled after
drivers
in /sys/pci. And, I have looked in /usr/share/examples/kld/cdev for an
example.

Attached is my Makefile. When compiling if_asic.c, I get undefines
"device_if.h", etc.
I have made a kernel image including my driver, and see where these files
are placed
in my config/MYBUILD/modules/.... directory path. What am I missing in
building
my driver as a loadable module?

Thanks for your attention.

Sue Wainer

------=_NextPart_001_000D_01C032C0.002A3690
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>I am trying to =
create an=20
Ethernet Device Driver Module that I can load with</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>kldload. I am =
assuming that the=20
driver probe function will be entered when the</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>module is=20
loaded.</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>I have created a =
standard pci=20
bus Ethernet driver, if_asic.c, modeled after =
drivers</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>in /sys/pci. And, I =
have looked=20
in /usr/share/examples/kld/cdev for an example.</SPAN></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>Attached is my =
Makefile. When=20
compiling if_asic.c, I get undefines "device_if.h", =
etc.</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>I have made a =
kernel image=20
including my driver, and see where these files are =
placed</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>in my=20
config/MYBUILD/modules/.... directory path. What am I missing in=20
building</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>my driver as a =
loadable=20
module?</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN =
class=3D318373317-10102000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>Thanks for your=20
attention.</SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN =
class=3D318373317-10102000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><SPAN class=3D318373317-10102000>Sue=20
Wainer</SPAN></FONT></DIV></BODY></HTML>

------=_NextPart_001_000D_01C032C0.002A3690--

------=_NextPart_000_000C_01C032C0.002A3690
Content-Type: application/octet-stream;
	name="Makefile"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="Makefile"



SUBDIR=	module

load: _SUBDIRUSE

unload: _SUBDIRUSE

.include <bsd.subdir.mk>


SRCS = if_asic.c 

CFLAGS = -I/sys/WaveNIC1/FreeBSD/AdapterDriver \
	-I/sys/WaveNIC1/FreeBSD/include \
	-I/sys/WaveNIC1/include \
	-I/sys/WaveNIC1/SharedSource \
	-I/sys/od \
	-I- -I. -I.. -I../.. -I../../../include -O -D__CYGWIN32__ \
	-DUSE_PPP -DDEFAULT_DEBUG_LEVEL=0 -D__CYGWIN32__ -DKERNEL

KMOD = wavenic

NOMAN = 1
.include "/usr/share/mk/bsd.kmod.mk"

------=_NextPart_000_000C_01C032C0.002A3690--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NDBBLIBAPKIAHMINJJNFOENECCAA.wainer>