From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 1 11:47:51 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F1C91065672 for ; Tue, 1 Mar 2011 11:47:51 +0000 (UTC) (envelope-from max@mxcrypt.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 50DDE8FC08 for ; Tue, 1 Mar 2011 11:47:50 +0000 (UTC) Received: by vws16 with SMTP id 16so4675851vws.13 for ; Tue, 01 Mar 2011 03:47:50 -0800 (PST) Received: by 10.220.117.198 with SMTP id s6mr924010vcq.127.1298978459376; Tue, 01 Mar 2011 03:20:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.42.67 with HTTP; Tue, 1 Mar 2011 03:20:29 -0800 (PST) In-Reply-To: <4D6C78D3.5090803@telus.net> References: <4D6C78D3.5090803@telus.net> From: Maxim Khitrov Date: Tue, 1 Mar 2011 06:20:29 -0500 Message-ID: To: Carl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 01 Mar 2011 12:16:54 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: listing all modules compiled into a kernel instance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2011 11:47:51 -0000 On Mon, Feb 28, 2011 at 11:40 PM, 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 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