Stop building all those kernel modules

Roland Smith rsmith at xs4all.nl
Sun May 18 11:13:08 UTC 2008


On Sat, May 17, 2008 at 05:32:50PM -0700, Luke Dean wrote:
> 
> I'm trying to use nanobsd to build a small kernel for an embedded system on 
> FreeBSD 7.
> 
> In previous versions, I could modify GENERIC by just commenting out all the 
> devices and options that I wasn't interested in, and buildkernel 
> KERNCONF=myconf would happily ignore all the things I wasn't interested in.
> 
> This no longer works.  Now everything gets built, even things that are 
> broken/incompatible with other options I've chosen.
> 
> I've tried setting NO_MODULES=YES, but the modules were still built.
> I see documentation for WITHOUT_MODULES, but it wants me to list every 
> module I don't want to build?  Come on!  There must be a better way...

Put the following in you kernel config:

makeoptions     MODULES_OVERRIDE=""

This will prevent the building of all modules. So you will only get the
devices built into the kernel. If you do wnat something to be built as a
module, put it between the quotation marks, e.g. MODULES_OVERRIDE="wlan ral".

Roland
-- 
R.F.Smith                                   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080518/aeee3f18/attachment.pgp


More information about the freebsd-questions mailing list