listing all modules compiled into a kernel instance
Damien Fleuriot
ml at my.gd
Tue Mar 1 12:03:31 UTC 2011
On 3/1/11 5:40 AM, Carl wrote:
> Kernel drivers can be (and in at least one case are) compiled into the
> kernel but are not reported when queried for, at least not in a way that
> I am aware of. For example, the ucom driver is present in the GENERIC
> kernel in this way. My expectation was that "kldstat -v" would list it,
> if present, but it does not. A design flaw?
>
> # ls /boot/kernel/ucom.ko
> /boot/kernel/ucom.ko
> # grep ucom /usr/src/sys/i386/conf/GENERIC
> # kldstat -v | grep ucom
> # kldload ucom.ko
> # tail -n 1 /var/log/messages
> Feb 28 18:18:15 xxxxxx kernel: interface ucom.1 already present in the
> KLD 'kernel'!
>
> How does one query an existing kernel for *all* compiled-in modules?
>
> I'm using FreeBSD-8.1-RELEASE-amd64/i386.
>
> Carl / K0802647
>
Well AFAIK kldstat -v should return them all...
Also, as a side note to your question, find below an excerpt from ucom's
man page:
SYNOPSIS
To compile this driver into the kernel, place the following line in
your
kernel configuration file:
device ucom
Alternatively, to load the driver as a module at boot time, place the
following line in loader.conf(5):
ucom_load="YES"
So indeed if you want it statically in the kernel, you need to add
"device ucom"
Have you tried doing that, building again then querying again with
kldstat -v ?
More information about the freebsd-hackers
mailing list