From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 1 12:03:31 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 185EB1065675 for ; Tue, 1 Mar 2011 12:03:31 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9F00A8FC08 for ; Tue, 1 Mar 2011 12:03:30 +0000 (UTC) Received: by eyg7 with SMTP id 7so1803292eyg.13 for ; Tue, 01 Mar 2011 04:03:29 -0800 (PST) Received: by 10.213.14.20 with SMTP id e20mr2503206eba.28.1298981009361; Tue, 01 Mar 2011 04:03:29 -0800 (PST) Received: from dfleuriot-at-hi-media.com ([83.167.62.196]) by mx.google.com with ESMTPS id q52sm4132039eei.3.2011.03.01.04.03.28 (version=SSLv3 cipher=OTHER); Tue, 01 Mar 2011 04:03:28 -0800 (PST) Message-ID: <4D6CE08F.6060103@my.gd> Date: Tue, 01 Mar 2011 13:03:27 +0100 From: Damien Fleuriot User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4D6C78D3.5090803@telus.net> In-Reply-To: <4D6C78D3.5090803@telus.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 12:03:31 -0000 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 ?