Date: Tue, 27 Oct 2015 10:31:26 +0100 From: Hans Petter Selasky <hps@selasky.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: freebsd-current@freebsd.org Subject: Re: Quick test building a module cross all targets and architectures Message-ID: <562F446E.6090906@selasky.org> In-Reply-To: <20151026182348.GT2257@kib.kiev.ua> References: <562DEE4F.5010203@selasky.org> <5888922.UHSgpdyTWY@ralph.baldwin.cx> <20151026182348.GT2257@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/26/15 19:23, Konstantin Belousov wrote: > On Mon, Oct 26, 2015 at 11:03:07AM -0700, 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 >> > > In any variant, this proposal sounds strange. Almost all in-kernel > code is compiled both for kernel and for modules. I am only aware of > exceptions for i915kms, which was done for a reason which is no longer > valid. In other words, if your goal is to check that the change does not > break compilation of some kernel code, then it is wrong to not compile > kernels. > > Note that kernel and modules compilation environments are differrent. > Hi, I understand that the compilation environments are different. How would you suggest to build-test a handful of C-files under a single device keyword and associated kernel module cross all kernels we have in a 10-minutes time-frame? MODULES_OVERRIDE can be defined from within kernel configs aswell, so possibly a MODULES_OVERRIDE_OVERRIDE is needed for this kind of feature. How about some kind of KERNCONF_APPEND= parameter, which contains instructions for "config" to only emit a single device keyword, yet, keeping all options and parameters. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?562F446E.6090906>