From owner-svn-src-all@freebsd.org Tue Oct 30 15:51:13 2018 Return-Path: Delivered-To: svn-src-all@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 9CCED10EC101; Tue, 30 Oct 2018 15:51:13 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it1-x129.google.com (mail-it1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 307376C203; Tue, 30 Oct 2018 15:51:13 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it1-x129.google.com with SMTP id e74-v6so14263621ita.2; Tue, 30 Oct 2018 08:51:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TTyCi66JHO1YteAEwLiBFFwX3lWJuIwKdIv4J98LG38=; b=nQIKHvp3lRHqFO41RXL+yQlaYhPaPFSnVCKRHgblepj+oOm+DiHDqTWx2hJcxgtqg8 wfwIY+yZTD330wI0KmqOUVa1zU6KNL1cVouO7QyBlYj5MfN2SxJB7Vf6JVu4zxdjdm+h Z0Dx/ikX952yTI8QxidiIWdYzulZY4bCFQig3kuIbyTPFsgV6XJetT+66nT5z90Ci66m X8fYxlHHPHyD4nC+5WUEoo9M9majTsp0SCh90MuWW3IZxe6cDJmCiIUE0PjNzccwefAw ljpIf96gDU1iBwTon4tJ5EPqo/KGuOAahNu2GqsB8K9W7hhB7BCIUi1OgcZhQCS9onNi d1xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=TTyCi66JHO1YteAEwLiBFFwX3lWJuIwKdIv4J98LG38=; b=R4jEWsHLBBLZvbfXsX01r/gUksVO/gFT0JlHcdk66VXGyFVZvp97b+OhFKuxUtxAaG 4aE3Wud+zRoMNJRAQHDIaoeorwYS87GudWYGLng6sbRitVLG6Rz47MLtkeq8khRPKdO2 Qpna24x4hfPwWB+3GWZGFZIG5t4csfKcfLd21zpR+bqVEmsxw0Rr8Ix2T+3lCgUHX1PH vycDErYOOhzlQ9wrwerrxC/bNmEVAHtFZbjagJRYWoq1OnjQtnv+beIrD3ebmDoGnV4C 5RjQUraudEKTb6+6W3O3nHRL004ff9Z7ElcgrJmGdg3uaRszge+rBMYdzDUT0bABuILu f2OQ== X-Gm-Message-State: AGRZ1gIlyGSIwZjQSJ+XejVfc8Ej2FlI0fqzdY+k9/1Kkyc4B+ilqan9 OTAmxzHF+xtQP9vfoNzWxwXvXMkuI4k= X-Google-Smtp-Source: AJdET5dijz3Otl1siu9XTyQmfaRtgnxDltiYc090ZgHee351K34ka7KqlfI00wQG4MQ45zqaexc62A== X-Received: by 2002:a05:660c:190:: with SMTP id v16mr1728944itj.92.1540914672099; Tue, 30 Oct 2018 08:51:12 -0700 (PDT) Received: from raichu (toroon0560w-lp130-08-67-71-176-199.dsl.bell.ca. [67.71.176.199]) by smtp.gmail.com with ESMTPSA id d8sm7061548itk.38.2018.10.30.08.51.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Oct 2018 08:51:11 -0700 (PDT) Sender: Mark Johnston Date: Tue, 30 Oct 2018 11:51:09 -0400 From: Mark Johnston To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r339901 - head/sys/conf Message-ID: <20181030155109.GC39423@raichu> References: <201810300023.w9U0NcOb048740@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201810300023.w9U0NcOb048740@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2018 15:51:13 -0000 On Tue, Oct 30, 2018 at 12:23:38AM +0000, John Baldwin wrote: > Author: jhb > Date: Tue Oct 30 00:23:37 2018 > New Revision: 339901 > URL: https://svnweb.freebsd.org/changeset/base/339901 > > Log: > Permit local kernel modules to be built as part of a kernel build. > > Add support for "local" modules. By default, these modules are > located in LOCALBASE/sys/modules (where LOCALBASE defaults to > /usr/local). Individual modules can be built along with a kernel by > defining LOCAL_MODULES to the list of modules. Each is assumed to be > a subdirectory containing a valid Makefile. If LOCAL_MODULES is not > specified, all of the modules present in LOCALBASE/sys/modules are > built and installed along with the kernel. > > This means that a port that installs a kernel module can choose to > install its source along with a suitable Makefile to > /usr/local/sys/modules/. Future kernel builds will then include > that kernel module using the kernel configuration's opt_*.h headers > and install it into /boot/kernel along with other kernel-specific > modules. > > This is not trying to solve the issue of folks running GENERIC release > kernels, but is instead aimed at folks who build their own kernels. > For those folks this ensures that kernel modules from ports will > always be using the right KBI, etc. This includes folks running any > KBI-breaking kernel configs (such as PAE). > > There are still some kinks to be worked out with cross-building (we > probably shouldn't include local modules in cross-built kernels by > default), but this is a sufficient starting point. > > Reviewed by: imp > MFC after: 3 months > Relnotes: yes > Differential Revision: https://reviews.freebsd.org/D16966 > > Modified: > head/sys/conf/kern.post.mk > > Modified: head/sys/conf/kern.post.mk > ============================================================================== > --- head/sys/conf/kern.post.mk Tue Oct 30 00:22:14 2018 (r339900) > +++ head/sys/conf/kern.post.mk Tue Oct 30 00:23:37 2018 (r339901) > @@ -35,24 +35,41 @@ KERN_DEBUGDIR?= ${DEBUGDIR} > > .MAIN: all > > +.if !defined(NO_MODULES) > +# Default prefix used for modules installed from ports > +LOCALBASE?= /usr/local > + > +LOCAL_MODULES_DIR?= ${LOCALBASE}/sys/modules > + > +# Default to installing all modules installed by ports unless overridden > +# by the user. > +.if !defined(LOCAL_MODULES) > +LOCAL_MODULES!= ls ${LOCAL_MODULES_DIR} > +.endif > +.endif During a buildkernel I now get several instances of: ls: /usr/local/sys/modules: No such file or directory make[2]: "/usr/home/markj/src/freebsd-dev/sys/conf/kern.post.mk" line 47: warning: "ls /usr/local/sys/modules" returned non-zero status Perhaps /usr/local/sys/modules should be specified in the BSD.usr.dist mtree file?