From owner-freebsd-questions@FreeBSD.ORG Fri Nov 25 18:27:57 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71B53106564A for ; Fri, 25 Nov 2011 18:27:57 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 04F988FC08 for ; Fri, 25 Nov 2011 18:27:56 +0000 (UTC) Received: by faap15 with SMTP id p15so5257433faa.13 for ; Fri, 25 Nov 2011 10:27:56 -0800 (PST) Received: by 10.152.102.138 with SMTP id fo10mr21465893lab.44.1322245675839; Fri, 25 Nov 2011 10:27:55 -0800 (PST) Received: from dfleuriot-at-hi-media.com ([83.167.62.196]) by mx.google.com with ESMTPS id ne3sm23598474lab.7.2011.11.25.10.27.54 (version=SSLv3 cipher=OTHER); Fri, 25 Nov 2011 10:27:55 -0800 (PST) Message-ID: <4ECFDE2A.4090609@my.gd> Date: Fri, 25 Nov 2011 19:27:54 +0100 From: Damien Fleuriot User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: buildkernel not honoring WITH_MODULES from make.conf ? (was: Re: Quick build of stripped-down kernel) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2011 18:27:57 -0000 On 11/24/11 4:17 PM, b. f. wrote: > > If you are going to build most of the modules, but only want to > exclude a few, then add the directories of the modules to be excluded > (relative to /usr/src/sys/modules) to WITHOUT_MODULES, for example in > /etc/make.conf. If you are only going to build a few modules, and want > to exclude the majority of the modules, then add the directories of > the modules that are to be built to MODULES_OVERRIDE. For no modules > at all, set NO_MODULES. See /usr/src/sys/modules/Makefile and > /usr/src/sys/conf/kern.post.mk for details. You may also save some > time by using one of your faster machines to build the OS for the > slower machines. > > b. Hijacking this thread to report what might or might not be a problem on my part. On a 8.2-RELEASE box, I have set the following in /etc/make.conf: KERNCONF=MULTI WITH_MODULES=geom_label if_lagg linprocfs linsysfs linux mfi_linux I have then run, from /usr/src : make buildkernel make installkernel I notice, at the end of installkernel: [snip] ===> xl (install) install -o root -g wheel -m 555 if_xl.ko /boot/kernel install -o root -g wheel -m 555 if_xl.ko.symbols /boot/kernel ===> zfs (install) install -o root -g wheel -m 555 zfs.ko /boot/kernel install -o root -g wheel -m 555 zfs.ko.symbols /boot/kernel Why does it build and install these modules (and a whole lot of other ones) although they're not part of my WITH_MODULES list ? kldstat reports: Id Refs Address Size Name 1 21 0xffffffff80100000 999620 kernel 2 1 0xffffffff80a9a000 bc10 geom_label.ko 3 1 0xffffffff80aa6000 1358 mfi_linux.ko 4 4 0xffffffff80aa8000 42558 linux.ko 5 1 0xffffffff80c22000 3ee0 linprocfs.ko 6 1 0xffffffff80c26000 a11 linsysfs.ko 7 1 0xffffffff80c27000 4f2c if_lagg.ko My issue here is that I totally don't need if_xl for example and would really love for it to be neither built nor installed. Have I misunderstood WITH_MODULES' use ?