From owner-freebsd-drivers@FreeBSD.ORG Wed Sep 3 05:40:18 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 01AF1DFB for ; Wed, 3 Sep 2014 05:40:17 +0000 (UTC) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1blp0189.outbound.protection.outlook.com [207.46.163.189]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "MSIT Machine Auth CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 881421E15 for ; Wed, 3 Sep 2014 05:40:16 +0000 (UTC) Received: from BY1PR0301MB0902.namprd03.prod.outlook.com (25.160.195.141) by BY1PR0301MB0901.namprd03.prod.outlook.com (25.160.195.140) with Microsoft SMTP Server (TLS) id 15.0.1015.19; Wed, 3 Sep 2014 05:40:07 +0000 Received: from BY1PR0301MB0902.namprd03.prod.outlook.com ([25.160.195.141]) by BY1PR0301MB0902.namprd03.prod.outlook.com ([25.160.195.141]) with mapi id 15.00.1015.018; Wed, 3 Sep 2014 05:40:07 +0000 From: Wei Hu To: "freebsd-drivers@freebsd.org" Subject: How to enable a debug print option Thread-Topic: How to enable a debug print option Thread-Index: Ac/HOLHXLihyjThiRFePBbs21ZoslA== Date: Wed, 3 Sep 2014 05:40:07 +0000 Message-ID: <3cc81e2896e3413a9a9a613c5ff16fd5@BY1PR0301MB0902.namprd03.prod.outlook.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [167.220.232.169] x-microsoft-antispam: BCL:0;PCL:0;RULEID:;UriScan:; x-forefront-prvs: 032334F434 x-forefront-antispam-report: SFV:NSPM; SFS:(6009001)(199003)(189002)(85852003)(95666004)(101416001)(76576001)(90102001)(81542001)(64706001)(20776003)(80022001)(66066001)(4396001)(86362001)(77096002)(83072002)(19625215002)(92566001)(74662001)(110136001)(99286002)(87936001)(74316001)(46102001)(229853001)(15975445006)(83322001)(16236675004)(2351001)(21056001)(86612001)(105586002)(74502001)(50986999)(85306004)(76482001)(79102001)(33646002)(81342001)(31966008)(107886001)(2656002)(77982001)(15202345003)(108616004)(106356001)(107046002)(99396002)(558084003)(19300405004)(19580395003)(54356999)(24736002); DIR:OUT; SFP:; SCL:1; SRVR:BY1PR0301MB0901; H:BY1PR0301MB0902.namprd03.prod.outlook.com; FPR:; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-OriginatorOrg: microsoft.onmicrosoft.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 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 05:40:18 -0000 I am on head and want to enable CAMDEBUG so I can get more logging informat= ion. 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? Thanks so much, Wei 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 From owner-freebsd-drivers@FreeBSD.ORG Wed Sep 3 20:54:37 2014 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CAB577E for ; Wed, 3 Sep 2014 20:54:37 +0000 (UTC) Received: from mail-ig0-f178.google.com (mail-ig0-f178.google.com [209.85.213.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 425B113D0 for ; Wed, 3 Sep 2014 20:54:36 +0000 (UTC) Received: by mail-ig0-f178.google.com with SMTP id hn18so9833598igb.11 for ; Wed, 03 Sep 2014 13:54:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=v7YNXWjEJvWtzZ2n75BAqPeD/OV4TWDTebyCw9Als2I=; b=mH/sTZhFyXC54U4mbnVSKv2jDUhIxlFlHbdHDxoDXaeDYat4OeKD1rxLtYIGWoMAvp DWjpFZt0fnLLuH23sbw5hU2+EgdCnnqD1cJZ/XZRWhfUfmXuSLyKobtD5d9bCUW+hHZI EqLAuJm7tLvw6GPJ/tf7sp2O1iiPwzEV291DnENGlNeY+9+pyIrOLek57TSDylkI8GSk fzSwCbuSpYZPRlUnC0ZVlLmNADDZmwDyDpms8noUHdpKx/LoNlcsD+0kyiCkJaTWvSER avin48CnyKW2HY4Fxw2W9xIItkpNajiCME0hP7xCxKlE7jUbKxYAVMkycUoi6HCuX3yQ pSYQ== X-Gm-Message-State: ALoCoQnMSlmorRBzhMO9/2+byUpeuMNgp7FKo1RXL55BvJL/ltR2BEeX41wZGzS7N43tCKLpy/so X-Received: by 10.43.44.2 with SMTP id ue2mr140405icb.35.1409777670681; Wed, 03 Sep 2014 13:54:30 -0700 (PDT) Received: from bsdimp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id p5sm6505957iga.5.2014.09.03.13.54.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 13:54:30 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_D7BE4DE4-A308-47D5-8ECC-45939C0A3456"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: How to enable a debug print option From: Warner Losh In-Reply-To: <20472808.lRnG8xA50K@ralph.baldwin.cx> Date: Wed, 3 Sep 2014 14:54:38 -0600 Message-Id: References: <3cc81e2896e3413a9a9a613c5ff16fd5@BY1PR0301MB0902.namprd03.prod.outlook.com> <20472808.lRnG8xA50K@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-drivers@freebsd.org 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:54:37 -0000 --Apple-Mail=_D7BE4DE4-A308-47D5-8ECC-45939C0A3456 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 For this, it might be easier to do: # cd sys/amd64/conf # cat << EOF > MYKERNEL include =93GENERIC=94 options CAMDBEUG EOF # cd ../../.. # That is, create a file that include GENERIC and adds the options this = way. Warner On Sep 3, 2014, at 2:06 PM, John Baldwin wrote: > 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. >>=20 >> Also how can I know if this flag has been enabled or not? >=20 > # cd /sys/amd64/conf > # cp GENERIC MYKERNEL >=20 > - edit MYKERNEL and add a line containing 'options CAMDEBUG' >=20 > # cd /usr/src > # make buildkernel KERNCONF=3DMYKERNEL > # make installkernel KERNCONF=3DMYKERNEL INSTKERNNAME=3Dtest > # nextboot -k test > # shutdown -r now >=20 > This creates a kernel config file named 'MYKERNEL', adds CAMDEBUG to = it, and=20 > then builds a kernel from that configuration. It installs it to = /boot/test=20 > and arranges for the next boot to use /boot/test/kernel instead of=20 > /boot/kernel/kernel. (The second boot will revert back to=20 > /boot/kernel/kernel.) >=20 > --=20 > John Baldwin > _______________________________________________ > freebsd-drivers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-drivers > To unsubscribe, send any mail to = "freebsd-drivers-unsubscribe@freebsd.org" --Apple-Mail=_D7BE4DE4-A308-47D5-8ECC-45939C0A3456 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUB4AOAAoJEGwc0Sh9sBEAovsQAKjbOdwPzF3j865usrmZuCHE jRyioZbkIjBt6OSW38h+ivlCHS64tfD3tOS3lfso/9UnZQ/imdDtn+b13tqgfgrn pUqG6/e/5P/Tbl+WRLyLgwk5aW1TS+6R6OAowepHCbrW1p1KB55K7czKfHyT9xpa +PXXJfvoMYv5eURNCClr2shsXyzL04O1l/hLfrmrSL2rk6ZHKFVW9ekf2NgL7p6S K5TYeOn8bgJQQgWTzYgMT4Od594q3P/Xa4hYL7757u1MFgPlErtSBNM4eqyyM3vY ctS1yXYdle6HzqOwSX31FlN+E7ma2914kCH6B/C5bvo6JC5awJBmbJoIQqPxV9la aWKqGVPFY5iPiVQsaDLgDgt3Hj9sR0x6D+OIzcqAsI0IHZAvBV/0X+eV9VfxoHm1 qITTue1DMAqdsF1CFXwlDbiSjX5Ht9MTT6kkfoXMxSP9K6eJN1yfuidDAfLUZRDZ HTXOt/Z+0SN+CJNsVygPKoYq8nA86DXS4qgZGkLETmzQd/9RcljSuDpJ5X5KJb0s SB+lBsZMy+3YvzxBzxz90p7WQ+CFjvWG0mPXR24SFw0DJUgZdhwLnzofK11bgMQi YZq5YBtOLb1KQbrSiDcOYHj5lmIfr0eZ5VfL6PvL4UHaX+146IvqF1ah7rK7quUX 1l2TJAu/wbezDn//i3hw =MOJV -----END PGP SIGNATURE----- --Apple-Mail=_D7BE4DE4-A308-47D5-8ECC-45939C0A3456--