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--