From owner-freebsd-current@FreeBSD.ORG Wed Nov 18 01:47:48 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94906106566B for ; Wed, 18 Nov 2009 01:47:48 +0000 (UTC) (envelope-from ben@wanderview.com) Received: from mail.wanderview.com (mail.wanderview.com [66.92.166.102]) by mx1.freebsd.org (Postfix) with ESMTP id 345108FC0A for ; Wed, 18 Nov 2009 01:47:47 +0000 (UTC) Received: from xykon.in.wanderview.com (xykon.in.wanderview.com [10.76.10.152]) (authenticated bits=0) by mail.wanderview.com (8.14.3/8.14.3) with ESMTP id nAI1leYI063809 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 18 Nov 2009 01:47:41 GMT (envelope-from ben@wanderview.com) Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Ben Kelly In-Reply-To: <19e9a5dc0911171614l42f4c90ci2abce9982727ef61@mail.gmail.com> Date: Tue, 17 Nov 2009 20:47:40 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <70268D94-FB8F-4E24-89F5-7E1718EF4267@wanderview.com> References: <200911172021.16848.gnemmi@gmail.com> <41D86F39-D98A-4195-8345-765E0F742FAE@wanderview.com> <19e9a5dc0911171614l42f4c90ci2abce9982727ef61@mail.gmail.com> To: Gonzalo Nemmi X-Mailer: Apple Mail (2.1077) X-Spam-Score: -1.44 () ALL_TRUSTED X-Scanned-By: MIMEDefang 2.67 on 10.76.20.1 Cc: freebsd-current@freebsd.org Subject: Re: WITHOUT_MODULES, does it actually work? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 18 Nov 2009 01:47:48 -0000 On Nov 17, 2009, at 7:14 PM, Gonzalo Nemmi wrote: > On Tue, Nov 17, 2009 at 8:14 PM, Ben Kelly wrote: >=20 >>=20 >> On Nov 17, 2009, at 5:21 PM, Gonzalo Nemmi wrote: >>=20 >>> I've been playing around with it (RC3, i386) and got it to look like >>> this (/etc/make.conf): >>>=20 >>> WITHOUT_MODULES=3D dev/firewire dev/bwi dev/bce dev/bfe dev/iwi = dev/iwn >>> zfs sound/driver/ad1816 sound/driver/ai2s sound/driver/als4000 >>> sound/driver/atiixp sound/driver/audiocs sound/driver/cmi >>> sound/driver/cs4281 sound/driver/cs4281 sound/driver/csa >>> sound/driver/davbus sound/driver/ds1 sound/driver/emu10k1 >>> sound/driver/emu10kx sound/driver/envy24 sound/driver/envy24ht >>> sound/driver/es137x sound/driver/ess sound/driver/fm801 >>> sound/driver/ich sound/driver/maestro3 sound/driver/mss >>> sound/driver/neomagic sound/driver/sb16 sound/driver/sb8 >>> sound/driver/sbc sound/driver/solo sound/driver/spicds >>> sound/driver/t4dwave sound/driver/uaudio sound/driver/via8233 >>> sound/driver/via82c686 sound/driver/vibes >>>=20 >>> Well .. I don't know what's wrong but no matter what, all of those >>> modules and stuff still get built and end up under /boot/kernel ... = I >>> just need "sound" and "snd_hda"... >>>=20 >>> What am I doing wrong? >>> Any hint will help >>=20 >> I think the contents of WITHOUT_MODULES should be the short names of = the >> directories in /usrc/src/sys/modules. So iwn instead of dev/iwn. = Also, it >> looks like you can only exclude modules at this top level directory >> granularity. So you can exclude sound, but not a particular device = under >> sound. >>=20 >> Anyway, thats based on a quick read of the Makefile. I could be = wrong, >> though. I've never actually used this feature. >>=20 >> Hope that helps. >>=20 >> - Ben >=20 >=20 > Hi Ben! > It could be that .. will try as soon as I can .. I didn't try before = because > most examples I found on google use it like that .. even the FreeBSD > handbook: > = http://www.freebsd.org/doc/en/books/handbook/kernelconfig-building.html(ta= ke > a look at the second "tip" in point 8.5). I've just verified on my machine that WITHOUT_MODULES will only strip = out top level module directories. You cannot pick and choose = subdirectories like the handbook suggests. I'm guessing someone cut & = paste the MODULES_OVERRIDE line to add the WITHOUT_MODULES entry. = Selecting subdirectories works in the MODULES_OVERRIDE case, though, = because you can add a subdirectory even if the original list you are = replacing only contains the top level module directories. Also, the current implementation of WITHOUT_MODULES does not support = being set in your kernel config using makeoptions. This patch fixes = that for me: Index: sys/conf/kern.pre.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/conf/kern.pre.mk (revision 254) +++ sys/conf/kern.pre.mk (working copy) @@ -163,6 +163,9 @@ .if defined(MODULES_OVERRIDE) MKMODULESENV+=3D MODULES_OVERRIDE=3D"${MODULES_OVERRIDE}" .endif +.if defined(WITHOUT_MODULES) +MKMODULESENV+=3D WITHOUT_MODULES=3D"${WITHOUT_MODULES}" +.endif .if defined(DEBUG) MKMODULESENV+=3D DEBUG_FLAGS=3D"${DEBUG}" .endif Hope that helps. - Ben=