How do I know if a module is not built-in to the kernel?

I probably know the answer to this but I'm I never thought of it before. So I'd rather ask. Apologies in advance but thank you.

So I'm guessing if xxx.ko is existing, it means the kernel config used doesn't have
Code:
device xxx
inside it?
 
Last edited by a moderator:
You can look at the output of kldstat -v if a certain driver is statically linked to the current kernel. The existence of xxx.ko in /boot/kernel is no indication of whether the module is a load-only or included in the kernel. All modules get built anyway during make buildkernel and modules mentioned in the kernel config with the device keyword are then statically linked to the kernel.
 
Back
Top