Like Linux, the FreeBSD kernel supports the loading and unloading of modules. This allows an administrator to add or remove driver support without having to recompile the kernel or reboot the system. The possible modules are the files ending with the .ko extension in /boot/kernel.
To list the currently loaded modules:
root@freebsd# kldstat
Id Refs Address Size Name
1 7 0xc0400000 63070c kernel
2 16 0xc0a31000 568dc acpi.ko
3 1 0xc14de000 15000 linux.ko
root@freebsd#
If you're curious as to the meaning of each of the columns, see Linux also provides the For example, to load USB scanner support: To remove it when you are finished #kldunload uscanner.ko root@freebsd# kldload acpi.ko If you don't know what a module does, ask root@freebsd# whatis pcn I think my NIC might fall into that category. Check this for more info on Freebsd Basics.man 2 kldstat
. Note that the usage and output is similar to Linux's lsmod
command.insmod
and rmmod
commands to load and unload modules. The FreeBSD equivalents are kldload
and kldunload
.
#kldload uscanner.ko
Loading something that is already statically compiled into the kernel produces this error message:
kldload: can't load acpi.ko: File existswhatis
. Suppose that I'm curious about the module if_pcn.ko. I won't include the .ko
in my query. I also won't include the if_
; it categorizes the module as an interface type. (Similarly, snd_
represents the sound category.) That leaves pcn
, making this command:
pcn(4) - AMD PCnet/PCI Fast Ethernet device driverman 4 pcn
gives the actual NIC models covered by this particular kernel module.
No comments:
Post a Comment