svn commit: r339901 - head/sys/conf

Rodney W. Grimes freebsd at pdx.rh.CN85.dnsmgr.net
Tue Oct 30 15:55:11 UTC 2018


> 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/<foo>.  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 at freebsd.org


More information about the svn-src-head mailing list