Modules and Custom Kernels
naylor.b.david at gmail.com
Sun Feb 7 16:14:16 UTC 2010
On Sunday 07 February 2010 05:40:19 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.
If you are building custom kernels then you are not that new to FreeBSD ;-)
> 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? 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.
Not all devices have a corresponding module (or some are bundled together in a
single module). Most of the devices you are interested in do have modules but
the module names are not always the same as the device name (i.e. network
devices have a if_ prefixed to the module name).
For further information have a look at the manual pages for a given device.
e.g. `man 4 bge` shows that bge requires devices miibus and bge in the kernel
or can be loaded using `if_bge_load="YES"` in loader.conf(5). This implies
the module name is if_bge. `man 4 sc` shows that no module is available (but
it does have many options that can be specified in the kernel configuration
By default all modules are built (even those whose devices are build in the
kernel). This behaviour can be changed. For a list of all the modules
available look at /sys/modules and `ls /boot/kernel/*.ko`.
> In all, the process looks relatively painless as long as I'm careful not
> to make too many changes to the GENERIC config.
I normally just copy GENERIC and tweak it but there are better ways than 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.
Not at all. Enjoy :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100207/d5f849a8/attachment.pgp
More information about the freebsd-questions