kldload vs Statically compiled in kernel

Polytropon freebsd at edvax.de
Wed Mar 17 03:04:02 UTC 2010

On Tue, 16 Mar 2010 19:37:58 -0500, Brandon Falk <falkman at gamozo.org> wrote:
> Hello fellow FreeBSD mates,
> I've always statically compiled in my modules into my kernel, rather 
> then using kldload, or throwing them in /boot/loader.conf. I'm just 
> wondering if there are actually any advantages to doing it this way.

There's only one important point that doesn't seem to be
achievable using the means of /boot/loader.conf: It is
the case if you have to make settings that are needed to
be present at compile time. An example:

	device          bktr
	options         BKTR_USE_PLL
	options         BKTR_GPIO_ACCESS
	options         BKTR_USE_FREEBSD_SMBUS

Allthough you can load bktr.ko, you can't specify those
parameters. The same seems to be true for such settings:

	options         SC_DFLT_FONT
	makeoptions     SC_DFLT_FONT=iso
	options         ATKBD_DFLT_KEYMAP
	makeoptions     ATKBD_DFLT_KEYMAP=german.iso
	options         UKBD_DFLT_KEYMAP
	makeoptions     UKBD_DFLT_KEYMAP=german.iso

Another scenario, well, it's more an attitude, is to taylor
a kernel exactly to present hardware, letting it contain
only those components that *need* to be present. This can
be required when operating on low space.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list