From owner-freebsd-drivers@FreeBSD.ORG Wed Sep 3 20:06:26 2014 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 896B3C5D for ; Wed, 3 Sep 2014 20:06:26 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61A5A1D89 for ; Wed, 3 Sep 2014 20:06:26 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 047E9B91C; Wed, 3 Sep 2014 16:06:25 -0400 (EDT) From: John Baldwin To: freebsd-drivers@freebsd.org Subject: Re: How to enable a debug print option Date: Wed, 03 Sep 2014 16:06:13 -0400 Message-ID: <20472808.lRnG8xA50K@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <3cc81e2896e3413a9a9a613c5ff16fd5@BY1PR0301MB0902.namprd03.prod.outlook.com> References: <3cc81e2896e3413a9a9a613c5ff16fd5@BY1PR0301MB0902.namprd03.prod.outlook.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 03 Sep 2014 16:06:25 -0400 (EDT) X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 20:06:26 -0000 On Wednesday, September 03, 2014 05:40:07 AM Wei Hu wrote: > I am on head and want to enable CAMDEBUG so I can get more logging > information. This flag is in /usr/src/sys/conf/NOTES file. After reading > the manual of 'config' I still have no idea of how to do this. > > Also how can I know if this flag has been enabled or not? # cd /sys/amd64/conf # cp GENERIC MYKERNEL - edit MYKERNEL and add a line containing 'options CAMDEBUG' # cd /usr/src # make buildkernel KERNCONF=MYKERNEL # make installkernel KERNCONF=MYKERNEL INSTKERNNAME=test # nextboot -k test # shutdown -r now This creates a kernel config file named 'MYKERNEL', adds CAMDEBUG to it, and then builds a kernel from that configuration. It installs it to /boot/test and arranges for the next boot to use /boot/test/kernel instead of /boot/kernel/kernel. (The second boot will revert back to /boot/kernel/kernel.) -- John Baldwin