Date: Wed, 17 Jul 2002 13:19:07 +0000 From: Alex Drummond <alex@abingdon74.freeserve.co.uk> To: freebsd-questions@freebsd.org Subject: Compiling kernel module Message-ID: <200207171318.24744.alex@abingdon74.freeserve.co.uk>
next in thread | raw e-mail | index | archive | help
Hi, I'm trying to get a dummy PCI driver module to compile (code mostly taken from the FreeBSD developer's handbook), and I've run into a problem with a couple of header files. I include the file <sys/buf.h>, and it includes the following two preprocessor directives: #include "device_if.h" #include "bus_if.h" At the moment I'm compiling this module (main source file called fb.c) in my home directory using the following Makefile: ---------- # Makefile for the skeleton module SRCS = fb.c KMOD = fb .include <bsd.kmod.mk> ---------- The makefile seems to automatically create an '@' directory linking to /usr/src/sys, but the two headers device_if.h and bus_if.h do not appear in this directory alongside buf.h, so there is a preprocessing error in bus.h. After a bit of diggging, I found that device_if.h and bus_if.h could be found a few directories further in form /usr/src/sys/compile/XXX/......, so my question is, how should I set up my Makefile, etc. to allow me to build my little module? Btw, I can compile a custom kernel no problem, so I don't think my kernel sources have got messed up. thanks, Alex To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207171318.24744.alex>
