mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 18:12:36 +03:00
[ELF] Add ability to boot ELF images generated by wraplinux and mkelfImage
Delete ELF as a generic image type. The method for invoking an ELF-based image (as well as any tables that must be set up to allow it to boot) will always depend on the specific architecture. core/elf.c now only provides the elf_load() function, to avoid duplicating functionality between ELF-based image types. Add arch/i386/image/elfboot.c, to handle the generic case of 32-bit x86 ELF images. We don't currently set up any multiboot tables, ELF notes, etc. This seems to be sufficient for loading kernels generated using both wraplinux and coreboot's mkelfImage. Note that while Etherboot 5.4 allowed ELF images to return, we don't. There is no callback mechanism for the loaded image to shut down gPXE, which means that we have to shut down before invoking the image. This means that we lose device state, protection against being trampled on, etc. It is not safe to continue afterwards.
This commit is contained in:
@@ -121,8 +121,7 @@
|
||||
*
|
||||
*/
|
||||
#undef IMAGE_NBI /* NBI image support */
|
||||
#undef IMAGE_ELF64 /* ELF64 image support */
|
||||
#undef IMAGE_ELF /* ELF image support */
|
||||
#define IMAGE_ELF /* ELF image support */
|
||||
#undef IMAGE_FREEBSD /* FreeBSD kernel image support */
|
||||
#define IMAGE_MULTIBOOT /* MultiBoot image support */
|
||||
#undef IMAGE_AOUT /* a.out image support */
|
||||
|
||||
Reference in New Issue
Block a user