[syslinux] Question about syslinux EFI alpha version

Klaus Knopper knoppix at knopper.net
Tue May 7 06:05:17 PDT 2013


Hello Matt,

On Tue, May 07, 2013 at 01:33:09PM +0100, Matt Fleming wrote:
> On Tue, 07 May, at 01:05:22PM, Klaus Knopper wrote:
> > I checked out version 6.00-pre git of syslinux (the "firmware" branch)
> > and was able to compile efi32 and efi64 versions (w/ gnu-efi 3.0t from
> > Debian/experimental) of syslinux.efi on my 32bit netbook, however, I
> > think that the generated file format for both .efi files is just wrong.
> > Neither the OMVF EFI firmware, nor grub-efi or elilo can load the
> > generated syslinux.efi binaries, and the reason seems to be this:
> 
> Hmm.. I have successfully loaded syslinux.efi from the OVMF firmware. I
> didn't think that grub-efi or elilo had the facilities to execute EFI
> applications?

In fact, the grub-efi chainloader can load EFI-Binaries (itself, or elilo).

> What error messages are you seeing when loading
> syslinux.efi from OVMF?

None, it doesn't even attempt to load the file and just says it can't
boot from harddisk. The EFI Shell in OVMF is unfortunately
disfunctional, so no further debugging possible.

copying elilo.efi (64bit) to efi/boot/bootx64.efi -> works, loads linux kernel and initrd correctly.

copying grub.efi (64bit) to efi/boot/bootx64.efi -> works, loads linux kernel and initrd correctly,
also allows me to chainload elilo.efi or grub.efi from the grub shell.

copying syslinux.efi (64bit) to efi/boot/bootx64.efi -> EFI firmware does not even try to load the file.

Attempt to chainload syslinux.efi by grub results in a somewhat
ambiguous error message that suggests the file is incomplete, which may
just mean that the format is wrong.

> > $ file elilo.efi syslinux.efi syslinux.so
> > elilo.efi:    PE32+ executable (EFI application) x86-64 (stripped to external PDB), for MS Windows
> > syslinux.efi: MS-DOS executable
> > syslinux.so:  ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
> > 
> > The output for syslinux.efi just looks wrong.
> 
> Well, the .efi file works fine when executed from multiple firmware
> implementations.

All I can use for testing for now, is qemu-system-x86_64 with option
-bios /usr/share/ovmf/OVMF.fd, which works with elilo and grub-efi, but
not with my compiled syslinux.efi. I have no full 64bit system
installed, so one theory could be that I need to compile the wrapper on
a 64bit system.

Could you please send me a signed copy of your syslinux.efi for 63 and
32bit? Maybe it's just my compile environment.

> I'm not sure what magic file(1) uses to figure out the
> type of PE32+ files, but I assure you that all the required fields
> appear in the syslinux.efi header.

Reading wrapper.c makes me think so, too, but again, the flags in the
elilo.efi and grub.efi headers differ from my compile result for
syslinux.efi.

> People have brought this discrepancy
> up before and I've just never found the time to fix it.

If you can send me your binaries of syslinux.efi that run in your test
environment, I could at least check if it is a compile or runtime
problem in my case.

> > So it looks like I cannot even test syslinux.efi right now because there
> > is no EFI-suitable binary generated at all.
>  
> Have you actually tried running syslinux.efi from the 6.0-pre* releases,
> either the EFI shell or the EFI boot manager? They should work.

I only found the source, no precompiled binaries yet.

Regards
-Klaus


More information about the Syslinux mailing list