mirror of
https://github.com/ipxe/ipxe
synced 2025-12-15 00:12:19 +03:00
[efi] Add EFI image format and basic runtime environment
We have EFI APIs for CPU I/O, PCI I/O, timers, console I/O, user access and user memory allocation. EFI executables are created using the vanilla GNU toolchain, with the EXE header handcrafted in assembly and relocations generated by a custom efilink utility.
This commit is contained in:
24
src/arch/i386/Makefile.efi
Normal file
24
src/arch/i386/Makefile.efi
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*- makefile -*- : Force emacs to use Makefile mode
|
||||
|
||||
# The EFI linker script
|
||||
#
|
||||
LDSCRIPT = arch/i386/scripts/efi.lds
|
||||
|
||||
# Use a relocatable link; we perform final relocations in the efilink utility.
|
||||
#
|
||||
LDFLAGS += -r -d -S
|
||||
|
||||
# Media types.
|
||||
#
|
||||
NON_AUTO_MEDIA += efi
|
||||
|
||||
# Rule for building EFI files
|
||||
#
|
||||
$(BIN)/%.efi.tmp-reloc : $(BIN)/%.efi.tmp $(EFILINK)
|
||||
$(QM)$(ECHO) " [EFILINK] $@"
|
||||
$(Q)$(LD) -e 0 -o /dev/null $< # Check for unresolved symbols
|
||||
$(Q)$(EFILINK) $< $@
|
||||
|
||||
$(BIN)/%.efi : $(BIN)/%.efi.tmp-reloc
|
||||
$(QM)$(ECHO) " [FINISH] $@"
|
||||
$(Q)$(OBJCOPY) -Obinary $< $@
|
||||
Reference in New Issue
Block a user