From owner-freebsd-stable Fri Jun 15 7:46:25 2001 Delivered-To: freebsd-stable@freebsd.org Received: from turtle.looksharp.net (cc360882-a.strhg1.mi.home.com [24.2.221.22]) by hub.freebsd.org (Postfix) with ESMTP id 28E5937B40B for ; Fri, 15 Jun 2001 07:46:13 -0700 (PDT) (envelope-from bandix@looksharp.net) Received: from localhost (bandix@localhost) by turtle.looksharp.net (8.11.1/8.11.1) with ESMTP id f5FEk4H84643; Fri, 15 Jun 2001 10:46:04 -0400 (EDT) (envelope-from bandix@looksharp.net) Date: Fri, 15 Jun 2001 10:46:04 -0400 (EDT) From: "Brandon D. Valentine" To: Jamie Norwood Cc: Subject: Re: Kernel compilation In-Reply-To: <20010615103820.A94093@mushhaven.net> Message-ID: <20010615104157.S84422-100000@turtle.looksharp.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 15 Jun 2001, Jamie Norwood wrote: >Is there a way to get the kernel to NOT build every module under the sun? >I prefer my kernels to have in them just what I want them to, not what >something else decides should be there. Yet every kernel I build makes >modules for things like USB, Sound, NICs I don't have... This is annoying >because, for one thing, it slows down compiles immensely. Secondly, it >is, theoretically, possible that some of these things (USB, for example), >may actually exist, thus be installed, and if they have a security problem, >I would be vulnerable with smoething I didn't want in the first place! Your logic is a little flawed. Those modules are simply built and placed in /modules for future use. They are not by any means built into the kernel and they don't slow the kernel down any. They also are not a security hazard. If you don't insert the module, it is not running. They don't insert themselves into the kernel. >Any suggestions? Yeah, check out the /etc/make.conf and /etc/defaults/make.conf files. Setting NO_MODULES = true in the /etc/make.conf file will make sure that the modules are not built at all, either will world or kernel. There are other MODULES related options to check out as well. However, remember that many things like linux emulation are normally used as kernel modules under FreeBSD and if you don't explicitly build them into your monolithic kernel you won't be able to use them. Also remember if you're gonna turn off module building that you remove the /modules directory so you don't end up accidentally using old modules with your new monolithic kernel. -- Brandon D. Valentine The very powerful and the very stupid have one thing in common. Instead of altering their views to fit the facts, they alter the facts to fit their views ... which can be very uncomfortable if you happen to be one of the facts that needs altering. - Doctor Who, "Face of Evil" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message