[syslinux] syslinux (pxelinux.0) debug prints

Gene Cumm gene.cumm at gmail.com
Mon Jun 9 19:31:23 PDT 2014


On Mon, Jun 9, 2014 at 7:47 PM, Gene Cumm <gene.cumm at gmail.com> wrote:
> On Thu, Jun 5, 2014 at 8:50 AM, Wissam Shoukair <wissams at mellanox.com> wrote:
>> Hi Gene,
>>
>> More information about this…
>>
>> I have found in the syslinux git that this commit id is the last good
>> commit:
>>
>> commit 41c29c26d70fde563d7c255872bbadad87a39dfa (tag:
>> refs/tags/syslinux-5.02-pre3)
>> Author: Matt Fleming <matt.fleming at intel.com>
>> Date:   Fri Feb 22 15:13:38 2013 +0000
>>
>>     com32: Add com32_cmdline() which returns argv[1..argc-1]
>>
>>     cmd.c32 needs an equivalent of __com32.cs_cmdline now that the COMBOOT
>>     code is dead. Introducing com32_cmdline(), which returns a string
>>     consisting of module arguments from argv[1] to argv[argc-1], separated
>>     by spaces.
>>
>>
>>     Reported-by: Gene Cumm <gene.cumm at gmail.com>
>>     Signed-off-by: Matt Fleming matt.fleming at intel.com
>>
>>
>> This is the commit which the problem started to happen:
>>
>> commit 76da2ae050d72a31fd47c2fb53f7081781de62ff
>>
>> Merge: 41c29c2 7931230
>> Author: Matt Fleming <matt.fleming at intel.com>
>> Date:   Mon Feb 25 15:25:16 2013 +0000
>>
>>     Merge branch 'lwip' into elflink
>>
>>     Welcome to Syslinux 5.10.
>
> So your observed issue is present post-lwIP merge.  Are you using
> pxelinux.0 or lpxelinux.0 (the distinction is crucial)?
>
> On Sun, Jun 8, 2014 at 9:12 AM, Wissam Shoukair <wissams at mellanox.com> wrote:
>> Hi Gene,
>>
>> First of I want to thank you for replying…
>
>> Regarding the dprintf(), how I can use it? I need to print strings before
>> ldlinux.c32 is loaded. (do I need to compile the pxelinux.0 with specific
>> flag?)
>
> Depends, read further.
>
>> For example If I want to print something in gpxe_init() which is at the
>> start of the pxelinux.0 execution, how I can do that?
>
> Can you use a serial port?  If you can't, this would mean you need to
> avoid printf()/dprintf() for your debugging and you're looking at a
> far simpler function, writestr() or attempting to restructure what's
> in pxelinux.0 (a task that's likely non-trivial).
>
> I'll try to test current head iPXE ISO with 6.03-pre12 tonight.

Test results in VMware Workstation 10.0.2:

vlance (AMD Am79C970A; Linux pcnet32 driver) had no issue with current
iPXE ISO (e0478), Syslinux-6.03-pre13 pxelinux.0 and lpxelinux.0
e1000 (Intel) also had no issues
VMXNET3 seemed to hesitate momentarily on pxelinux.0 but didn't load
properly with lpxelinux.0 and exhibited similar symptoms.

Removing iPXE from the equation, VMXNET3 with lpxelinux.0 shows some
initial hesitation but all other attempt to get to a Syslinux boot
prompt are extremely responsive.

> --
> -Gene
>
> A: Because it messes up the order in which people normally read text,
> especially the archives of mailing lists.
> Q: Why is Top-posting such a bad thing?
>
> "No one ever says, 'I can't read that ASCII(plain text) e-mail you sent me.'"
>
>
>> From: Gene Cumm [mailto:gene.cumm at gmail.com]
>> Sent: יום ה 29 מאי 2014 13:28
>> To: Wissam Shoukair; For discussion of Syslinux and tftp-hpa
>> Subject: Re: syslinux (pxelinux.0) debug prints
>>
>>
>>
>> On May 29, 2014 5:25 AM, "Wissam Shoukair" <wissams at mellanox.com> wrote:
>>>
>>> Hi Gene,
>>>
>>> I was wondering how I can set the “printf” output to be visible on the
>>> screen? (I’m using syslinux-6.03-pre02)
>>
>> printf () or dprintf ()? You need to watch what functions are available at
>> the time you want to print.  For example, printf isn't available until
>> ldlinux.c32 is loaded.
>>
>> Why not 6.03-pre12?



More information about the Syslinux mailing list