Mailing List Archive

linux.c32 doesn't work
Hi!

The linux.c32 module doesn't boot my kernel, while pxelinux itself
does:

kernel vmlinuz-2.6.23
append initrd=initrd.img-2.6.23 root=/dev/mapper/root

works, while

kernel linux.c32
append vmlinuz-2.6.23 initrd=initrd.img-2.6.23 root=/dev/mapper/root

does not: it stays sitting after loading the initrd without any
output. Version 3.50-pre2 worked, current git does not work.

Unless there's a known problem, I'll bisect as I find the time...
--
Thanks,
Feri.

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: linux.c32 doesn't work [ In reply to ]
Ferenc Wagner wrote:
> Hi!
>
> The linux.c32 module doesn't boot my kernel, while pxelinux itself
> does:
>
> kernel vmlinuz-2.6.23
> append initrd=initrd.img-2.6.23 root=/dev/mapper/root
>
> works, while
>
> kernel linux.c32
> append vmlinuz-2.6.23 initrd=initrd.img-2.6.23 root=/dev/mapper/root
>
> does not: it stays sitting after loading the initrd without any
> output. Version 3.50-pre2 worked, current git does not work.
>
> Unless there's a known problem, I'll bisect as I find the time...

Also, try to enable DEBUG output.

-hpa

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: linux.c32 doesn't work [ In reply to ]
"H. Peter Anvin" <hpa@zytor.com> writes:

> Also, try to enable DEBUG output.

How do I do that? I uncommented the lines

%define DEBUG_TRACERS 1 ; Uncomment to get debugging tracers
%define DEBUG_MESSAGES ; Uncomment to get debugging messages

in tracers.inc, which resulted in a 12 bytes bigger pxelinux.0, but
the output was all the same...
--
Thanks,
Feri.

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: linux.c32 doesn't work [ In reply to ]
Wagner Ferenc wrote:
> "H. Peter Anvin" <hpa@zytor.com> writes:
>
>> Also, try to enable DEBUG output.
>
> How do I do that? I uncommented the lines
>
> %define DEBUG_TRACERS 1 ; Uncomment to get debugging tracers
> %define DEBUG_MESSAGES ; Uncomment to get debugging messages
>
> in tracers.inc, which resulted in a 12 bytes bigger pxelinux.0, but
> the output was all the same...

Change com32/modules/linux.c.

-hpa

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: linux.c32 doesn't work [ In reply to ]
Ferenc Wagner <wferi@niif.hu> writes:

> The linux.c32 module doesn't boot my kernel, while pxelinux itself
> does:
>
> kernel vmlinuz-2.6.23
> append initrd=initrd.img-2.6.23 root=/dev/mapper/root
>
> works, while
>
> kernel linux.c32
> append vmlinuz-2.6.23 initrd=initrd.img-2.6.23 root=/dev/mapper/root
>
> does not: it stays sitting after loading the initrd without any
> output. Version 3.50-pre2 worked, current git does not work.

I'm using the following config file (the commented line starts the
kernel all right; it's a fairly stock kernel, anyway):

serial 0
console 0
default linux.c32 vmlinuz-2.6.23 console=ttyS0
#default vmlinuz-2.6.23 console=ttyS0

Booting this in QEMU gives (instead of freezing on real hardware):

gPXE 0.5.1 -- Open Source Boot Firmware -- http://etherboot.org
Features: HTTP DNS TFTP iSCSI AoE bzImage Multiboot PXE PXEXT
net0: 52:54:00:12:34:56 on PCI00:03.0 (open) TX:0 TXE:0 RX:0 RXE:0
DHCP (net0 52:54:00:12:34:56)... ok
net0: 192.168.0.2/255.255.255.0 gw 192.168.0.1
Booting from filename "bisect/pxelinux.0"
bisect/pxelinux.0... ok
qemu: fatal: Trying to execute code outside RAM or ROM at 0x000d0000

EAX=00002b7f EBX=0000c156 ECX=0000ff6f EDX=00000704
ESI=00000000 EDI=00000000 EBP=00000000 ESP=0000fff8
EIP=0000f6fa EFL=00000002 [-------] CPL=0 II=0 A20=1 HLT=0
ES =c08e 000c08e0 0000ffff 00009300
CS =c08e 000c08e0 0000ffff 00009b00
SS =0000 00000000 0000ffff 00009300
DS =f000 000f0000 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 00000000 00008000
TR =0030 00005cc4 00000067 00008900
GDT= 00005d30 00000037
IDT= 00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
CCS=00002b7f CCD=00002b7f CCO=ADDB
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
--
Regards,
Feri.

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: linux.c32 doesn't work [ In reply to ]
"H. Peter Anvin" <hpa@zytor.com> writes:

> Wagner Ferenc wrote:
>> "H. Peter Anvin" <hpa@zytor.com> writes:
>>
>>> Also, try to enable DEBUG output.
>>
>> How do I do that? I uncommented the lines
>>
>> %define DEBUG_TRACERS 1 ; Uncomment to get debugging tracers
>> %define DEBUG_MESSAGES ; Uncomment to get debugging messages
>>
>> in tracers.inc, which resulted in a 12 bytes bigger pxelinux.0, but
>> the output was all the same...
>
> Change com32/modules/linux.c.

Sorry, I just can't get it right. I added a #define DEBUG, but
linux.c32 stayed the same size: 12588 bytes. Added -DDEBUG to CFLAGS
in com32/{lib,modules}/Makefile, nothing again. I did make clean
between each try. How should I change linux.c? By adding proper
printf-s here and there?
--
Thanks,
Feri.

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: linux.c32 doesn't work [ In reply to ]
Wagner Ferenc wrote:
> Sorry, I just can't get it right. I added a #define DEBUG, but
> linux.c32 stayed the same size: 12588 bytes. Added -DDEBUG to CFLAGS
> in com32/{lib,modules}/Makefile, nothing again. I did make clean
> between each try. How should I change linux.c? By adding proper
> printf-s here and there?

-DDEBUG=1 is what you want to use.

Anyway, I did get confused -- I added some debugging stuff to
com32/modules/elf.c (not linux.c); for linux.c the equivalent code
should go into com32/lib/load_linux.c.

-hpa

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: linux.c32 doesn't work [ In reply to ]
"H. Peter Anvin" <hpa@zytor.com> writes:

> Anyway, I did get confused -- I added some debugging stuff to
> com32/modules/elf.c (not linux.c); for linux.c the equivalent code
> should go into com32/lib/load_linux.c.

Fine, it's getting clear now. Actually I spoke much rubbish
previously, I'll try again. Here is my config file:

========================================
serial 0 9600
console 0

#default linux.c32 vmlinuz-2.6.22-2-k7 console=ttyS0
default linux.c32 vmlinuz-2.6.23 console=ttyS0
#default vmlinuz-2.6.23 console=ttyS0
========================================

With current git only the commented lines work. I didn't check older
versions systematically, but I couldn't make the uncommented line work
with any version I tried (back to 3.52-pre2). The image sizes are
very close to each other, and even if I truncate vmlinuz-2.6.23 to the
size of vmlinuz-2.6.22-2-k7, the error is exactly the same (with QEMU;
real hardware gives no error message, just freezes).

========================================
vmlinuz-2.6.22-2-k7: 1367280 bytes
vmlinuz-2.6.23: 1384696 bytes
========================================

========================================
PXELINUX 3.52 0x47213526 Copyright (C) 1994-2007 H. Peter Anvin
Loading vmlinuz-2.6.23... ok
qemu: fatal: Trying to execute code outside RAM or ROM at 0x000d0000

EAX=00002b7f EBX=0000c156 ECX=0000ff6f EDX=00000704
ESI=00000000 EDI=00000000 EBP=00000000 ESP=0000fff8
EIP=0000f6fa EFL=00000002 [-------] CPL=0 II=0 A20=1 HLT=0
ES =c08e 000c08e0 0000ffff 00009300
CS =c08e 000c08e0 0000ffff 00009b00
SS =0000 00000000 0000ffff 00009300
DS =f000 000f0000 0000ffff 00009300
FS =0000 00000000 0000ffff 00009300
GS =0000 00000000 0000ffff 00009300
LDT=0000 00000000 0000ffff 00008000
TR =0000 00000000 0000ffff 00008000
GDT= 00005cd0 0000002f
IDT= 00000000 0000ffff
CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
CCS=00002b7f CCD=00002b7f CCO=ADDB
FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
XMM00=00000000000000000000000000000000 XMM01=00000000000000000000000000000000
XMM02=00000000000000000000000000000000 XMM03=00000000000000000000000000000000
XMM04=00000000000000000000000000000000 XMM05=00000000000000000000000000000000
XMM06=00000000000000000000000000000000 XMM07=00000000000000000000000000000000
========================================

So this is not a regression, I won't bisect it, as I found no version
which could boot vmlinuz-2.6.23. The truncation test makes me
skeptical about adding debug output to com32/lib/syslinux/load_linux.c,
but I'll give it a try if you think it could be useful. Also, if you
are willing to test my kernel, I can upload or send it to you.
--
Thanks,
Feri.

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
Re: linux.c32 doesn't work [ In reply to ]
Wagner Ferenc wrote:
> So this is not a regression, I won't bisect it, as I found no version
> which could boot vmlinuz-2.6.23. The truncation test makes me
> skeptical about adding debug output to com32/lib/syslinux/load_linux.c,
> but I'll give it a try if you think it could be useful. Also, if you
> are willing to test my kernel, I can upload or send it to you.

Sure, send it to me privately. If it works here, then we know it's
something hardware-specific (probably memory layout) and that debugging
output would be highly useful.

-hpa

_______________________________________________
SYSLINUX mailing list
Submissions to SYSLINUX@zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.