From owner-freebsd-questions Tue Jul 16 5:20:48 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEF6337B400 for ; Tue, 16 Jul 2002 05:20:43 -0700 (PDT) Received: from mail8.svr.pol.co.uk (mail8.svr.pol.co.uk [195.92.193.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9737D43E3B for ; Tue, 16 Jul 2002 05:20:42 -0700 (PDT) (envelope-from alex@abingdon74.freeserve.co.uk) Received: from modem-1237.ballistic.dialup.pol.co.uk ([62.25.150.213] helo=darkstar.freeserve.co.uk) by mail8.svr.pol.co.uk with esmtp (Exim 3.35 #1) id 17URJo-0002hs-00 for freebsd-questions@freebsd.org; Tue, 16 Jul 2002 13:20:41 +0100 Content-Type: text/plain; charset="us-ascii" From: Alex Drummond To: freebsd-questions@freebsd.org Subject: Compiling kernel module Date: Wed, 17 Jul 2002 13:19:07 +0000 User-Agent: KMail/1.4.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207171318.24744.alex@abingdon74.freeserve.co.uk> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I'm trying to get a dummy PCI driver module to compile (code mostly taken= from=20 the FreeBSD developer's handbook), and I've run into a problem with a cou= ple=20 of header files. I include the file , and it includes the=20 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=20 home directory using the following Makefile: ---------- # Makefile for the skeleton module SRCS =3D fb.c KMOD =3D fb =2Einclude ---------- The makefile seems to automatically create an '@' directory linking to=20 /usr/src/sys, but the two headers device_if.h and bus_if.h do not appear = in=20 this directory alongside buf.h, so there is a preprocessing error in bus.= h.=20 After a bit of diggging, I found that device_if.h and bus_if.h could be f= ound =20 a few directories further in form /usr/src/sys/compile/XXX/......, so my=20 question is, how should I set up my Makefile, etc. to allow me to build m= y=20 little module? Btw, I can compile a custom kernel no problem, so I don't think my kernel= =20 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