Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jul 2004 13:14:10 +0200
From:      Arjan Van Leeuwen <avleeuwen@gmail.com>
To:        Steven Adams <steve@drifthost.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: FreeBSD Kernel Recompile, Does not exclude modules
Message-ID:  <d86b487304071104142c75ba9f@mail.gmail.com>
In-Reply-To: <20040711072238.27566FE9A@drifthost.com>
References:  <20040711072238.27566FE9A@drifthost.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Steve,

On Sun, 11 Jul 2004 17:25:40 +1000, Steven Adams <steve@drifthost.com> wrote:
> Hey,
> 
> Reading from the FreeBSD Handbook I have compiled a new kernel that works
> fine.
> 
> In my config file I commented out a few things I don't need eg USB etc.
> 
> But for some reason when it booted back up into the new kernel, from ps aux
> it shows usb is up and running..

You mean that the program usbd is running. This is a userland program
that detects new USB devices and starts some predefined sequence of
commands when a certain device enters the system. You can turn it off
by adding usbd_enable="NO" to /etc/rc.conf.

> 
> /boot/kernel shows that usb.ko is there.
> 
> I don't understand why its included which I commented it out

There's a difference between 'compiling something into the kernel' and
using a kernel module. usb.ko is a kernel loadable module - a module
that you can load with kldload if you need it. It's not compiled into
the kernel. When you had 'device usb' in your kernel, usb would be
compiled into the kernel and you'd never need to load the kernel
loadable module for it. Now, you've removed usb from your kernel
configuration file, so usb support is not in your kernel. Should you
need it later, you can always load the module.

If the module is not loaded, it doesn't take up any resources (except
for the hard drive space it uses), so it shouldn't bother you.

If you really don't want to compile any modules at all when building
your kernel (for example, to save time when building a kernel), add
NO_MODULES=true to /etc/make.conf.

Arjan



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