From owner-freebsd-current@freebsd.org Mon Oct 26 19:12:19 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B6ABA1E97B for ; Mon, 26 Oct 2015 19:12:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 384A31C8D for ; Mon, 26 Oct 2015 19:12:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igbni9 with SMTP id ni9so80256133igb.1 for ; Mon, 26 Oct 2015 12:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2F+z276Zv9nNm+i/D+ra5MLXm6ItKYUglHBmw4QZEm0=; b=Ysz5tbzFbOQDQsl4nKQXa8GQGzF4XtAs+gTdsOJ3f/iewbAq12Xq62kI8wld9UQSjN ViDb/4/cT8PirFk6y3ix5aS/PBZOpZB8eP7CxQfuDChhWOnLJfB1ikpR5unafzeWxGHK tJ5bu3okQU4gBN+TLsMaWCWTT+Z46/5nLzukvcl4ZIKWJYfg+4qWJwUAgomnzfrXYGKC X9IYq9iCySn45aidjuUgp2sQxalK/c45/SFgRH2HF9KqARhzUJWmzNyU3vFNhhu4AndT EZUkex0aTBM4IPgKxnf2PR/b8gmdxysFvbbGToQvhEpyJEH0ieEu/ohpHUO+4eq2bFgj 26YA== MIME-Version: 1.0 X-Received: by 10.50.178.141 with SMTP id cy13mr19575605igc.61.1445886738579; Mon, 26 Oct 2015 12:12:18 -0700 (PDT) Received: by 10.36.46.66 with HTTP; Mon, 26 Oct 2015 12:12:18 -0700 (PDT) In-Reply-To: <20151026182348.GT2257@kib.kiev.ua> References: <562DEE4F.5010203@selasky.org> <5888922.UHSgpdyTWY@ralph.baldwin.cx> <20151026182348.GT2257@kib.kiev.ua> Date: Mon, 26 Oct 2015 12:12:18 -0700 Message-ID: Subject: Re: Quick test building a module cross all targets and architectures From: Adrian Chadd To: Konstantin Belousov Cc: Hans Petter Selasky , freebsd-current Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Oct 2015 19:12:19 -0000 On 26 October 2015 at 11: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. No, the goal isn't that - it's to do things like "let's recompile usb + usb modules, unload, load to test." It's not a substitute for the "test a full build"; it's for testing things that are easily tested as modules - usb, wlan, etc. -a