<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" xmlns:osnews="http://www.osnews.com/rss2#">
	<channel>
		<title>OSNews: </title>
		<link>http://www.osnews.com/story/17464/Remote_Kernel_Debugging_in_FreeBSD_Using_Serial_Communication</link>
		<description>Exploring the Future of Computing</description>
		<language>en-us</language>
		<copyright>Copyright 2001-2012, David Adams</copyright>
		<webMaster>adam+nospam@osnews.com</webMaster>
		<lastBuildDate>Wed, 15 Feb 2012 09:15:52 GMT</lastBuildDate>
		<image>
			<url>http://www.osnews.com/images/osnews.gif</url>
			<title>OSNews.com</title>
			<link>http://www.osnews.com</link>
		</image>
		<item>
			<title>Very General</title>
			<link>http://www.osnews.com/thread?220316</link>
			<guid isPermaLink="true">http://www.osnews.com/thread?220316</guid>
			<description>Article provides very general info about that, in depth info and documentation can be found in FreeBSD Handbook if someone is more interested:<br />
<br />
<a href="http://freebsd.org/handbook/serialcomms.html" rel="nofollow">http://freebsd.org/handbook/serialcomms.html</a><br />
<a href="http://freebsd.org/handbook/kernelconfig.html" rel="nofollow">http://freebsd.org/handbook/kernelconfig.html</a><br />
<a href="http://freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/kerneldebug.html" rel="nofollow">http://freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/ke...</a> <br />
<br />
Also the article describes old generally unused method of building kernel:<br />
# make depend<br />
# make<br />
# make install<br />
<br />
Now this schema is preferred:<br />
# cd /usr/src<br />
# make buildkernel<br />
# make installkernel KODIR=/boot/TESTING<br />
# nextboot -k TESTINGEdited 2007-03-11 21:25</description>
			<pubDate>Sun, 11 Mar 2007 21:20:00 GMT</pubDate>
			<author>donotreply@osnews.com (vermaden)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>Kernel modification</title>
			<link>http://www.osnews.com/thread?220317</link>
			<guid isPermaLink="true">http://www.osnews.com/thread?220317</guid>
			<description>personally, I found the article very interesting, but I think the author is not up to date regarding kernel compilation in FreeBSD. The section &quot;Modifying kernel files&quot; leaves no evidence which FreeBSD version he refers to.<br />
<br />
While his suggestions still work with any FreeBSD from 4 up to 6, the procedure he introduced is from the FreeBSD 4 era and is not usually used today (with FreeBSD 6).<br />
<br />
Don't get me wrong, I like the article, but I also would like to make a few notes.<br />
<br />
1. The author mentiones only vi and emacs as my favourite editor, but my favourite editor is the mcedit from the Midnight Commander suite. :-)<br />
<br />
2. Regarding the the serial port communication for kernel debugging, the author suggests to enter the following line:<br />
<br />
device sio0 at isa? port IO_COM1 flags 0x80<br />
<br />
This does not conform to the kernel config file layout in FreeBSD since version 5. Furthermore, the serial driver sio is part of the GENERIC kernel profile and does not need to be added.<br />
<br />
While<br />
<br />
device sio0<br />
<br />
should be<br />
<br />
device sio<br />
<br />
since FreeBSD 5, the appendix<br />
<br />
at isa? port IO_COM1 flags 0x80<br />
<br />
does no longer reside in the kernel config file. It can be set dnamically in /boot/device.hints or statically in /sys/i386/conf/MYKERNEL.hints as follows:<br />
<br />
hint.sio.0.at=&quot;isa&quot;<br />
hint.sio.0.port=&quot;0x3F8&quot;<br />
hint.sio.0.flags=&quot;0x80&quot;<br />
<br />
Judging from the standard installation, only a change in flags from 0x10 to 0x80 appears.<br />
<br />
3. The call of config, make depend etc. is no longer needed. This mechanism is controlled by the Makefile in /usr/src.<br />
<br />
Instead of<br />
<br />
$ cd /usr/src/sys/i386/conf/<br />
$ config -g MYKERNEL<br />
$ cd /usr/src/sys/compile/MYKERNEL/<br />
$ make depend<br />
$ make<br />
$ make install<br />
<br />
the new way is:<br />
<br />
# cd /usr/src<br />
# make buildkernel KERNCONF=MYKERNEL<br />
# make installkernel KERNCONF=MYKERNEL<br />
<br />
This will perform the config and depend steps as well. The only thing I don't know exactly is how to set the &quot;config -g&quot; effect, maybe there's a special macro or option for this.<br />
<br />
Please remember: The procedure the author provided will still work. See the FreeBSD handbook sections at <a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html" rel="nofollow">http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelcon...</a>  for more information.<br />
<br />
4. Note that all operations above need root privileges because there are write operations inside /usr/src.</description>
			<pubDate>Sun, 11 Mar 2007 21:26:00 GMT</pubDate>
			<author>donotreply@osnews.com (Doc Pain)</author>
			<category>Comments</category>
		</item>

		<item>
			<title>RE: Kernel modification</title>
			<link>http://www.osnews.com/thread?220364</link>
			<guid isPermaLink="true">http://www.osnews.com/thread?220364</guid>
			<description><i>the new way is:<br />
<br />
# cd /usr/src<br />
# make buildkernel KERNCONF=MYKERNEL<br />
# make installkernel KERNCONF=MYKERNEL</i><br />
<br />
Just a note: there is also the even easier<br />
<br />
# cd /usr/src<br />
# make kernel KERNCONF=MYKERNEL<br />
<br />
and you're done with both build and install.<br />
<br />
About the &quot;config -g&quot;, I don't think that it's needed having makeoptions     DEBUG=-g in your kernconf (GENERIC has it).</description>
			<pubDate>Mon, 12 Mar 2007 01:30:00 GMT</pubDate>
			<author>donotreply@osnews.com (dcwrwrfhndz)</author>
			<category>Comments</category>
		</item>
	</channel>
</rss>

