I have reason to believe that an odd box that is having boot trouble has three instances of "!PXE" in the chunk of memory that "Method D" should look at. I thought I would try to find out how pxelinux copes with this, by trying to insert printfs in pxe_init, but nothing gets printed. I can spew lots of output if I set DEBUGOPT = -DDEBUG=1 -DDEBUG_STDIO -DCORE_DEBUG=1 but given that this box doesn't have a serial port, anything I add will whizz off the screen.>From looking at com32/include/dprintf.h, it looks as though all this does isto define dprintf to printf, so why is it that if don't define DEBUG_STDIO and CORE_DEBUG, and just use printf directly, nothing appears? I assume (given the dprintfs) that ldlinux.c32 is loaded by the time pxe_init is run, so printf calls should be legal. What am I missing? Cheers, Patrick
On Tue, Apr 14, 2015 at 11:25 AM, Patrick Welche via Syslinux <syslinux at zytor.com> wrote: 0) What version(s)? Have you tried the precompiled ones at kernel.org?> I have reason to believe that an odd box that is having boot trouble has > three instances of "!PXE" in the chunk of memory that "Method D" should > look at.1) You can't have 3 instances in the same place. You might have 3 that are overwriting each other. 2) Method D is quite the fall back.> I thought I would try to find out how pxelinux copes with this, by trying > to insert printfs in pxe_init, but nothing gets printed.This is normal.> I can spew lots of output if I set > > DEBUGOPT = -DDEBUG=1 -DDEBUG_STDIO -DCORE_DEBUG=1 > > but given that this box doesn't have a serial port, anything I add will > whizz off the screen.Serial or some sort of IP KVM with logging is ideal.> From looking at com32/include/dprintf.h, it looks as though all this does is > to define dprintf to printf, so why is it that if don't define DEBUG_STDIO > and CORE_DEBUG, and just use printf directly, nothing appears?If ldlinux.c32 isn't loaded, printf() shouldn't work though printf() in 1 context might not be the same as another.> I assume (given the dprintfs) that ldlinux.c32 is loaded by the time > pxe_init is run, so printf calls should be legal. > > What am I missing?See #0. Also, you may need to look at writestr(). -- -Gene
On Tue, Apr 14, 2015 at 03:20:08PM -0400, Gene Cumm wrote:> > I thought I would try to find out how pxelinux copes with this, by trying > > to insert printfs in pxe_init, but nothing gets printed. > > This is normal.Can you give me hint as to why setting> > DEBUGOPT = -DDEBUG=1 -DDEBUG_STDIO -DCORE_DEBUG=1changes that state of normality? (AFAICT dprintf.h defines dprintf to printf, so why wouldn't using printf directly work? printf.o gets built regardless of DEBUG settings AFAICT.)> > From looking at com32/include/dprintf.h, it looks as though all this does is > > to define dprintf to printf, so why is it that if don't define DEBUG_STDIO > > and CORE_DEBUG, and just use printf directly, nothing appears? > > If ldlinux.c32 isn't loaded, printf() shouldn't work though printf() > in 1 context might not be the same as another.So my assumption below is wrong? How does DEBUG_STDIO/CORE_DEBUG affect the loading of ldlinux.c32?> > I assume (given the dprintfs) that ldlinux.c32 is loaded by the time > > pxe_init is run, so printf calls should be legal.Thanks! Patrick