[ipxe-devel] iMac 2007 silently fails booting kernel
Michael Brown
mcb30 at ipxe.org
Sat Jan 16 20:41:10 UTC 2016
On 16/01/16 14:19, Linus Lüssing wrote:
>> No; on a UEFI platform you can load only iPXE scripts and EFI
>> executables. You can't directly load an ELF binary.
>
> Ah, okay. But technically, theoretically it would be possible to
> implement an iPXE EFI to boot into an ELF kernel, wouldn't it? I
> mean, even an EFI kernel will be able and need to run ELFs at some
> point.
It would be fairly easy to place an arbitrary ELF binary in memory and
jump to its execution point, but that ELF binary would need some way to
interact with the firmware to carry out tasks such as discovering the
system memory map. No such standard is defined on UEFI except for the
EFI API itself, which requires an EFI executable.
> Anyways, the kernel I have seems to have CONFIG_EFI_STUB=y set, so
> it should be suitable to be chainloaded from an iPXE EFI, even if
> "$ file vmlinux" says it's an ELF, right?
> (though from the brief wiki scaning I'm not quite sure what
> EFI_STUB does, yet. Especially don't know whether extracting the
> vmlinux from the provided vmlinuz kind of breaks EFI_STUB for
> vmlinux bc. of specific entry point addresses or something like
> that, don't know - that would explain the "Exec format error" for
> the extracted vmlinux and why there's no such error for the
> original vmlinuz)
vmlinux is an ELF binary
vmlinuz is vmlinux wrapped into the format of an EFI executable
(Actually, vmlinuz is a hybrid binary that acts as both an EFI
executable and a bzImage, but that's not relevant here.)
Michael
More information about the ipxe-devel
mailing list