[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:
Michael Brown
2008-06-09 13:11:46 +01:00
parent fe3162ab1c
commit 77a5cc6b13
6 changed files with 120 additions and 29 deletions

View File

@@ -131,11 +131,8 @@ REQUIRE_OBJECT ( nmb );
#ifdef IMAGE_NBI
REQUIRE_OBJECT ( nbi );
#endif
#ifdef IMAGE_ELF64
REQUIRE_OBJECT ( elf64 );
#endif
#ifdef IMAGE_ELF
REQUIRE_OBJECT ( elf );
REQUIRE_OBJECT ( elfboot );
#endif
#ifdef IMAGE_FREEBSD
REQUIRE_OBJECT ( freebsd );