Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Nov 2011 19:27:54 +0100
From:      Damien Fleuriot <>
Subject:   buildkernel not honoring WITH_MODULES from make.conf ? (was: Re: Quick build of stripped-down kernel)
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
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/ 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:
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:
===> 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 ?

Want to link to this message? Use this URL: <>