listing all modules compiled into a kernel instance

Jason Helfman jhelfman at e-e.com
Tue Mar 1 20:45:12 UTC 2011


On Tue, Mar 01, 2011 at 12:01:48PM -0800, Carl thus spake:
>On 2011-03-01 3:20 AM, Maxim Khitrov wrote:
>> kldstat provides information about components that were loaded
>> dynamically. If your kernel was built with INCLUDE_CONFIG_FILE option
>> (enabled by default in GENERIC), then you can see the static
>> components using:
>>
>> config -x /boot/kernel/kernel
>
>As has been shown though, "kldstat -v" actually does show static
>components, at least those declared with DRIVER_MODULE(), and "config
>-x" does not improve on the situation at all because components like
>ucom were not cited in the configuration file. IMHO, there needs to be a
>reliable way to query an existing kernel that yields a _complete_ list
>of which components are actually included.
>
>On 2011-03-01 5:00 AM, John Baldwin wrote:
>>> Maybe ucom doesn't appear because it doesn't have a DRIVER_MODULE()
>>> declaration (because it isn't a driver).
>>
>> Yes, that would explain it.
>
>I can explicitly include ucom in a kernel by adding "device ucom" in the
>configuration file, in which case it would call DRIVER_MODULE(), right?
>That would then make it appear in the "kldstat -v" list? So why is it a
>driver when it's done explicitly, but not a driver when done implicitly?
>That makes no sense to me since the functionality doesn't change. IMHO,
>this is a bug that needs to be fixed, not just for ucom but any
>implicitly included driver.
>
>Who should submit a bug report?

There was a documentation bug that was put in regarding the ucom device, and
it was to update the device name in the documentation.

http://www.freebsd.org/cgi/query-pr.cgi?pr=155074

I don't know if a PR is still required, but this may be worth a look first.

>
>Carl                                                   / K0802647

--
Jason Helfman
System Administrator
experts-exchange.com
http://www.experts-exchange.com/M_4830110.html
E4AD 7CF1 1396 27F6 79DD  4342 5E92 AD66 8C8C FBA5


More information about the freebsd-hackers mailing list