Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Oct 2015 08:49:09 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Quick test building a module cross all targets and architectures
Message-ID:  <4276722.e5fJFDHm8P@ralph.baldwin.cx>
In-Reply-To: <562F3EA1.9020708@selasky.org>
References:  <562DEE4F.5010203@selasky.org> <5888922.UHSgpdyTWY@ralph.baldwin.cx> <562F3EA1.9020708@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, October 27, 2015 10:06:41 AM Hans Petter Selasky wrote:
> On 10/26/15 19:03, John Baldwin wrote:
> > On Monday, October 26, 2015 10:11:43 AM Hans Petter Selasky wrote:
> >> Hi,
> >>
> >> We have NO_MODULES for building kernel without modules, but no NO_KERNEL
> >> to only build the modules.
> >>
> >> What do you think about the following patch:
> >>
> >>> diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
> >>> index ddf828e..f0920df 100644
> >>> --- a/sys/conf/kern.post.mk
> >>> +++ b/sys/conf/kern.post.mk
> >>> @@ -32,7 +32,11 @@ KERN_DEBUGDIR?=      ${DEBUGDIR}
> >>>
> >>>   .for target in all clean cleandepend cleandir clobber depend install \
> >>>       obj reinstall tags
> >>> +.if !defined(NO_KERNEL)
> >>>   ${target}: kernel-${target}
> >>> +.else
> >>> +${target}:
> >>> +.endif
> >>>   .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules)
> >>>   ${target}: modules-${target}
> >>>   modules-${target}:
> >>
> >> It allows only a single module with MODULES_OVERRIDE= and NO_KERNEL=YES
> >> to be built with universe in very little time. This can save a lot of
> >> build time when changes are limited to a set of kernel modules.
> >
> > Can you just use something like MODULES_WITH_WORLD instead?
> >
> > make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules MODULES_OVERRIDE=foo
> >
> > (If it's only 1 module directory you can probably just use SUBDIR_OVERRIDE directly?)
> >
> > make tinderbox MAKE_JUST_WORLDS=yes SUBDIR_OVERRIDE=sys/modules/foo
> >
> 
> Hi John,
> 
> The command you suggested will re-build all the cross-tools, which is 
> not what I want.

NO_CLEAN=yes?  You have to build all the compilers no matter what, and for
incremental builds once you have NO_CLEAN=yes you only have to build it once.

Having a NO_KERNEL for buildkernel just seems rather obscure.  You still have
to have a config file (even if it's the implicit GENERIC).  Also, with your
change, you will still build the module umpteen times (once for each kernel,
so about 80 times on arm, etc.).  With MAKE_JUST_WORLDS you would only build
a "generic" module once per architecture.  That savings is likely far more
than the cost of the additional tools.

-- 
John Baldwin



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