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>

next in thread | raw e-mail | index | archive | help
Hello,

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

.include <bsd.init.mk>

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

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

.if exists(${SYSDIR}/compat/linuxkpi/common/include)
CFLAGS+=3D -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 'MAXPA=
THLEN'
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 s=
ole
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.



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