Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jun 2001 10:46:04 -0400 (EDT)
From:      "Brandon D. Valentine" <bandix@looksharp.net>
To:        Jamie Norwood <mistwolf@mushhaven.net>
Cc:        <freebsd-stable@FreeBSD.ORG>
Subject:   Re: Kernel compilation
Message-ID:  <20010615104157.S84422-100000@turtle.looksharp.net>
In-Reply-To: <20010615103820.A94093@mushhaven.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <bandix@looksharp.net>

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010615104157.S84422-100000>