From owner-freebsd-drivers@freebsd.org Fri Apr 6 14:25:18 2018 Return-Path: Delivered-To: freebsd-drivers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A8CEF89F29 for ; Fri, 6 Apr 2018 14:25:18 +0000 (UTC) (envelope-from juraj.vanco@intel.com) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "orsmga106.jf.intel.com", Issuer "COMODO RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B09E97E4D1 for ; Fri, 6 Apr 2018 14:25:17 +0000 (UTC) (envelope-from juraj.vanco@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2018 07:24:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,415,1517904000"; d="scan'208,217";a="31245050" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga007.jf.intel.com with ESMTP; 06 Apr 2018 07:24:05 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by irsmsx110.ger.corp.intel.com (163.33.3.25) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 6 Apr 2018 15:24:04 +0100 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.164]) by irsmsx111.ger.corp.intel.com ([169.254.2.167]) with mapi id 14.03.0319.002; Fri, 6 Apr 2018 15:24:04 +0100 From: "Vanco, Juraj" To: "freebsd-drivers@freebsd.org" Subject: FreeBSD out of tree driver missing rules / guide Thread-Topic: FreeBSD out of tree driver missing rules / guide Thread-Index: AdPNsthjYYxE8gP9RYqTH2qBS5feig== Date: Fri, 6 Apr 2018 14:24:03 +0000 Message-ID: <996B37956731CF40B1A674B085ACCE9440CD685B@IRSMSX102.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiODI1YjcyNzgtNGYxYS00YmJmLWFiYmMtYzJkZWJmOGEyNzE4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlMwQUdkVTN1MEFOdlVoWHA0MVp1RjMyVkZLb3dYS09kbTJJOVVEUW1ZODQ9In0= dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2018 14:25:18 -0000 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 .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 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.