Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Mar 2004 08:16:28 -0800
From:      Chuck Tuffli <chuck_tuffli@agilent.com>
To:        thefly@acaro.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Compilation
Message-ID:  <20040302161627.GB10533@cre85086tuf.rose.agilent.com>
In-Reply-To: <20040302155403.6267.qmail@nexlab.it>
References:  <20040302155403.6267.qmail@nexlab.it>

next in thread | previous in thread | raw e-mail | index | archive | help
For the pci_* calls, you need to add the interface stuff.

In Makefile

SRC =	bus_if.h device_if.h pci_if.h device.c

In device.c

uncomment the #include <pci/*> lines

---chuck

On Tue, Mar 02, 2004 at 10:54:03AM -0500, thefly@acaro.org wrote:
> I did that. I've got some #difine collisions with PCI and some system 
> defines not finding files like: 
> 
> @/sys/bus.h:320: device_if.h: No such file or directory
> @/sys/bus.h:321: bus_if.h: No such file or directory
> In file included from wd1100-lkm.c:28:
> @/pci/pcivar.h:176: pci_if.h: No such file or directory
> In file included from wd1100-lkm.c:28: 
> 
> or problems with functions not found like: 
> 
> @/pci/pcivar.h: In function `pci_enable_io':
> @/pci/pcivar.h:274: warning: implicit declaration of function 
> `PCI_ENABLE_IO'
> @/pci/pcivar.h: In function `pci_disable_io':
> @/pci/pcivar.h:280: warning: implicit declaration of function 
> `PCI_DISABLE_IO'
> @/pci/pcivar.h: In function `pci_set_powerstate':
> @/pci/pcivar.h:307: warning: implicit declaration of function 
> `PCI_SET_POWERSTATE' 
> 
> code is here: http://chiakotay.nexlab.it/acaro/wd1100/wd1100.c 
> 
>  
> 
> 
> Chuck Tuffli writes:
> > Try creating a Makefile similar to the other loadable modules. For
> > example, 
> > 
> > MAINTAINER = you@yourdomain.whatever
> > KMOD       = mydriver 
> > 
> > .PATH:     ${.CURDIR}/../../dev/wd 
> > 
> > SRCS       = driver.c 
> > 
> > .include <bsd.kmod.mk> 
> > 
> > Then just type make. See src/sys/modules/*/Makefile for other
> > examples.
>  
> 

-- 
Chuck Tuffli    <chuck_tuffli AT NO_SPAM agilent DOT com>
Agilent Technologies, Storage Area Networking



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