How to get a list of all kernel modules

Scot Hetzel swhetzel at gmail.com
Sat Jun 30 05:59:09 UTC 2007


On 6/29/07, Kostik Belousov <kostikbel at gmail.com> wrote:
> It would be very convenient to have unified location for ports kernel
> modules. May be, even hier(7) compliant ?
>
> For instance, some random set of ports installed kernel modules to:
>
> sysutils/devcpu: /boot/modules/cpu.ko
> net/ng_car:     /boot/kernel/ng_car.ko
> (this means that ng_car.ko module will be trashed on next kernel update)
> audio/oss:      /usr/local/lib/oss/modules
>

I would propose that kernel module ports should install their
KLD(s)into /boot/modules, as that would allow the kernel module to be
loaded without specifing a path to the module:

kldload <module name>

instead of:

kldload /path/to/module/<module name>.ko

And allow the KLD to be loaded from /boot/loader.conf.

Another option would be to allow only specific types of modules to be
placed into /boot/modules (network, filesystem, ...) and then have the
remaining modules installed into PREFIX/libexec/kernel_modules (audio,
...).  A rc script for the module would then be used to load/unload
the module.


Scot
-- 
DISCLAIMER:
No electrons were mamed while sending this message. Only slightly bruised.


More information about the freebsd-ports mailing list