Great!!! So flexible debug way ...  It works! Thank you very much, Thomas!<div><br></div><div>-Sean-<br><div><br><div class="gmail_quote">On Fri, Jun 18, 2010 at 4:43 PM, Thomas Miletich <span dir="ltr">&lt;<a href="mailto:thomas.miletich@gmail.com">thomas.miletich@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello Sean,<br>
please don&#39;t forget to CC the list in your mails(or use &#39;Reply All&#39;).<br>
<br>
To enable debugging output for specific files, in this example undi.c,<br>
use the following command line to build gpxe:<br>
<br>
make bin/pnic.rom DEBUG=undi<br>
<br>
This line enables all DBG() and DBGC() output in undi.c. There are<br>
different debugging levels in gPXE, like DBG(level 1), DBG2(level 2),<br>
DBGP(level 4) and DBGIO(level 8). They are used like a bitfield.<br>
To enable DBG2() messages use DEBUG=undi:2. To enable DBG() and DBG2()<br>
messages use DEBUG=undi:3. You simply add the values of the debugging<br>
levels you want to enable. Separate multiple files with commas:<br>
DEBUG=rtl8139,undi:3<br>
<br>
Hope that helps<br>
<font color="#888888">Thomas<br>
</font><div><div></div><div class="h5"><br>
On Fri, Jun 18, 2010 at 10:24 AM, Sean Shoufu Luo &lt;<a href="mailto:luoshoufu@gmail.com">luoshoufu@gmail.com</a>&gt; wrote:<br>
&gt; Thomas,<br>
&gt; Thanks for quick reply. I forget to paste my environment: I load pnic.rom in<br>
&gt; bochs.<br>
&gt; pnic.rom<br>
&gt; 1. #define CONSOLE_SERIAL<br>
&gt; 2. #DBGLVL_MAX  1<br>
&gt; It seems console works since I can see the log &#39;no more network devices&#39; in<br>
&gt; the other end of serial. Is it?<br>
&gt; But the DBG is not enabled ... I call undi_start, but no expected log ...<br>
&gt; -Sean-<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Jun 18, 2010 at 4:10 PM, Thomas Miletich &lt;<a href="mailto:thomas.miletich@gmail.com">thomas.miletich@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hello,<br>
&gt;&gt; to enable serial console support open the file src/config/console.h<br>
&gt;&gt; and change the line<br>
&gt;&gt;  //#define       CONSOLE_SERIAL<br>
&gt;&gt; to<br>
&gt;&gt;  #define       CONSOLE_SERIAL<br>
&gt;&gt;<br>
&gt;&gt; CONSOLE_PCBIOS is already enabled by default for x86 build targets and<br>
&gt;&gt; there&#39;s no need to enable it again in console.h.<br>
&gt;&gt;<br>
&gt;&gt; The default settings are 115200 baud 8n1 on the first serial port(I/O<br>
&gt;&gt; address 0x3f8). Most BIOSes allow changing the I/O address of the<br>
&gt;&gt; serial ports. It&#39;s possible that your &#39;first&#39; serial port now has the<br>
&gt;&gt; I/O address of some other serial port and you have to adjust it&#39;s<br>
&gt;&gt; value in the BIOS or in config/serial.h. Alternatively you could use<br>
&gt;&gt; the serial port that as the I/O address 0x3f8 on your system.<br>
&gt;&gt;<br>
&gt;&gt; If this is what you already tried, we would like to know more about<br>
&gt;&gt; your setup(i.e. what serial cable did you use, did you use the right<br>
&gt;&gt; baud rate, etc).<br>
&gt;&gt;<br>
&gt;&gt; Thomas<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Jun 18, 2010 at 9:57 AM, Sean Shoufu Luo &lt;<a href="mailto:luoshoufu@gmail.com">luoshoufu@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; I am newbie for gpxe, and intend to transfer from etherboot to gpxe ....<br>
&gt;&gt; &gt; In etherboot, I just configure src/Config, but I don&#39;t find any<br>
&gt;&gt; &gt; configure<br>
&gt;&gt; &gt; file under gpxe.<br>
&gt;&gt; &gt; I tried to uncomment CONSOL_PCBIOS, CONSOL_SERIAL in config/console.h,<br>
&gt;&gt; &gt; but<br>
&gt;&gt; &gt; it seems not work!<br>
&gt;&gt; &gt; I didn&#39;t find workable guide from wiki, anyone can give a brief<br>
&gt;&gt; &gt; instruction?<br>
&gt;&gt; &gt; Or paste a guide link?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Another question:  how to enable DBG() to work? It seems a bit complex<br>
&gt;&gt; &gt; ...<br>
&gt;&gt; &gt; Yours sincerely,<br>
&gt;&gt; &gt; Sean<br>
&gt;&gt; &gt; --<br>
&gt;&gt; &gt; Face to sun<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; gPXE-devel mailing list<br>
&gt;&gt; &gt; <a href="mailto:gPXE-devel@etherboot.org">gPXE-devel@etherboot.org</a><br>
&gt;&gt; &gt; <a href="http://etherboot.org/mailman/listinfo/gpxe-devel" target="_blank">http://etherboot.org/mailman/listinfo/gpxe-devel</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Face to sun<br>
&gt;<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Face to sun<br>
</div></div>