From owner-svn-src-all@freebsd.org Tue Oct 30 15:55:11 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 57D6D10EC870; Tue, 30 Oct 2018 15:55:11 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2CA86C884; Tue, 30 Oct 2018 15:55:10 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w9UFt8fg062309; Tue, 30 Oct 2018 08:55:08 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w9UFt8eI062308; Tue, 30 Oct 2018 08:55:08 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201810301555.w9UFt8eI062308@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r339901 - head/sys/conf In-Reply-To: <20181030155109.GC39423@raichu> To: Mark Johnston Date: Tue, 30 Oct 2018 08:55:08 -0700 (PDT) CC: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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:55:11 -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 > > + .if exists (${LOCALBASE}/sys/modules) > > +LOCAL_MODULES_DIR?= ${LOCALBASE}/sys/modules .endif > > + > > +# 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? > > -- Rod Grimes rgrimes@freebsd.org