How to enable a debug print option

John Baldwin jhb at freebsd.org
Wed Sep 3 20:06:26 UTC 2014


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


More information about the freebsd-drivers mailing list