Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Mar 2011 06:20:29 -0500
From:      Maxim Khitrov <max@mxcrypt.com>
To:        Carl <k0802647@telus.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: listing all modules compiled into a kernel instance
Message-ID:  <AANLkTin-Cth9qpg_fOWS=UWNHvJWhOugvE_7iV=8P_Eo@mail.gmail.com>
In-Reply-To: <4D6C78D3.5090803@telus.net>
References:  <4D6C78D3.5090803@telus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 28, 2011 at 11:40 PM, Carl <k0802647@telus.net> 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 kerne=
l
> in this way. My expectation was that "kldstat -v" would list it, if prese=
nt,
> 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 KL=
D
> 'kernel'!
>
> How does one query an existing kernel for *all* compiled-in modules?
>
> I'm using FreeBSD-8.1-RELEASE-amd64/i386.
>
> Carl =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 / K0802647

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

See config(8) for more details.

- Max



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTin-Cth9qpg_fOWS=UWNHvJWhOugvE_7iV=8P_Eo>