Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2018 14:24:03 +0000
From:      "Vanco, Juraj" <juraj.vanco@intel.com>
To:        "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org>
Subject:   FreeBSD out of tree driver missing rules / guide
Message-ID:  <996B37956731CF40B1A674B085ACCE9440CD685B@IRSMSX102.ger.corp.intel.com>

index | next in thread | raw e-mail

Hello,

I try to write out of tree driver Makefile but I always get issues in headers.
My general question is if there are typical rules to compile out of tree driver.
Here is my code:

.include <bsd.init.mk>

.PATH: ${QATPATH}/qat_c3xxx $(FREEBSDPATH)

KMOD= my_module
SRCS=    my_module.c
SRCS+= device_if.h bus_if.h

.if exists(${SYSDIR}/compat/linuxkpi/common/include)
CFLAGS+= -I${SYSDIR}/compat/linuxkpi/common/include
.endif

.include <bsd.kmod.mk>

With the code above I am getting issues like
/usr/src/sys/sys/kernel.h:58:24: error: use of undeclared identifier 'MAXPATHLEN'
extern char kernelname[MAXPATHLEN];

I could be adding header by header by my own decision, but perhaps there is a rule
what headers to include to the SRCS?

jv
--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.


help

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