Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 1999 12:15:20 -0400 (EDT)
From:      Wayne Cuddy <wayne@crb-web.com>
To:        FreeBSD Hackers List <freebsd-hackers@FreeBSD.ORG>
Subject:   device driver interface
Message-ID:  <Pine.LNX.4.10.9909131204520.16008-100000@crb.crb-web.com>

next in thread | raw e-mail | index | archive | help
I am trying to understand how to integrate device drivers with the kernel.
(this is my first crack at device drivers) I have a few books on device
drivers but they are a little old and have a slightly different interface with
the kernel than FreeBSD.  I figured the best place to start would be to try to
building one of the samples.  So did I did 
>/usr/share/examples/drivers/make_device_drivers.sh WDC.  The script will
attempt to build the kernel and I get the following errors:


cc -c -O -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith
-Winline -Wuninitialized -Wformat -Wunused  -fformat-extensions -ansi
-nostdinc -I- -I. -I../.. -I/usr/include  -DKERNEL -DVM_STACK -include
opt_global.h -elf  ../../i386/isa/WCD.c
../../i386/isa/WCD.c: In function `WCDattach':
../../i386/isa/WCD.c:137: `WCDintr' undeclared (first use this function)
../../i386/isa/WCD.c:137: (Each undeclared identifier is reported only once
../../i386/isa/WCD.c:137: for each function it appears in.)
../../i386/isa/WCD.c: At top level:
../../i386/isa/WCD.c:177: `WCDintr' used prior to declaration
../../i386/isa/WCD.c: In function `WCDintr':
../../i386/isa/WCD.c:178: warning: unused variable `scp'
../../i386/isa/WCD.c: At top level:
../../i386/isa/WCD.c:188: conflicting types for `WCDioctl'
../../i386/isa/WCD.c:30: previous declaration of `WCDioctl'
../../i386/isa/WCD.c: In function `WCDclose':
../../i386/isa/WCD.c:226: warning: unused variable `scp'
../../i386/isa/WCD.c: In function `WCDread':
../../i386/isa/WCD.c:250: dereferencing pointer to incomplete type
../../sys/libkern.h:57: warning: inlining failed in call to `min'
../../i386/isa/WCD.c:250: warning: called from here
../../i386/isa/WCD.c:251: warning: implicit declaration of function `uiomove'
../../i386/isa/WCD.c: In function `WCDwrite':
../../i386/isa/WCD.c:267: dereferencing pointer to incomplete type
../../i386/isa/WCD.c: At top level:
../../i386/isa/WCD.c:273: conflicting types for `WCDmmap'
../../i386/isa/WCD.c:31: previous declaration of `WCDmmap'
../../i386/isa/WCD.c: In function `WCDmmap':
../../i386/isa/WCD.c:275: warning: unused variable `scp'
../../i386/isa/WCD.c: In function `WCDpoll':
../../i386/isa/WCD.c:296: warning: unused variable `scp'
../../i386/isa/WCD.c: At top level:
../../i386/isa/WCD.c:177: warning: `WCDintr' defined but not used
*** Error code 1

Why does this fail?  This script was installed of off my 3.2 cd set.

Does anyone know of an existing driver that would be a good place to start for
a newbie to understand these things?

Any and all help is appreciated,
Wayne



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.9909131204520.16008-100000>