Modules and Custom Kernels

Manolis Kiagias sonicy at
Sun Feb 7 08:20:05 UTC 2010

On 07/02/2010 5:40 π.μ., James Colannino wrote:
> Hey everyone.  Please bear with me as I'm very new to FreeBSD.  I've
> recently started building a custom kernel after having had to apply a
> patch to enable support for my wireless device (Atheros 9285) in
> 8.0-RELEASE, and had a quick question about the process in general.
> According to the documentation, a line with device <driver name> will
> cause that driver to be compiled into the kernel.  If one of those lines
> is commented out, does that mean that the driver will still be built,
> but that it will be installed as a module? 

Yes. Unless you have set some variables like WITHOUT_MODULES or
MODULES_OVERRIDE in /etc/make.conf. By default all modules will be built.
The modules will not be loaded automatically though. You will have to
use /boot/loader.conf to specify which ones to load.

>  I didn't see anything that
> told me that explicitly in the documentation, but that's the feeling I
> got from what I read.  I just want to make sure that my assumption is
> correct, and if not, how to make sure that something gets built as a
> module rather than built directly into the kernel.

You are doing just fine ;)

> In all, the process looks relatively painless as long as I'm careful not
> to make too many changes to the GENERIC config.

This is true also. Using some common sense and reading the comments in
GENERIC you can make your own custom kernel with little effort. Of
course you may also read the Handbook on this:

> Hopefully this isn't a dumb question :)  I really like FreeBSD so far,
> and think I'm going to enjoy my new experience quite a bit.

Sure you will, FreeBSD is addictive!

More information about the freebsd-questions mailing list