Skip to content

Commit

Permalink
[build] Add efidrv.cab target for UEFI Secure Boot signing
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed May 14, 2013
1 parent 640ab79 commit dbea47c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/Makefile
Expand Up @@ -49,6 +49,7 @@ ICCFIX := ./util/iccfix
EINFO := ./util/einfo
GENKEYMAP := ./util/genkeymap.pl
DOXYGEN := doxygen
LCAB := lcab
BINUTILS_DIR := /usr
BFD_DIR := $(BINUTILS_DIR)
ZLIB_DIR := /usr
Expand Down
4 changes: 3 additions & 1 deletion src/Makefile.housekeeping
Expand Up @@ -1086,7 +1086,9 @@ automedia :
#
define media_template
$(if $(filter $(1),$(AUTO_MEDIA)),$(call auto_media_template,$(1)))
$$(BIN)/all$(1)s : $$(foreach DRIVER,$$(DRIVERS),$$(BIN)/$$(DRIVER).$(1))
LIST_$(1) := $$(if $$(LIST_NAME_$(1)),$$($$(LIST_NAME_$(1))),$$(DRIVERS))
ALL_$(1) = $$(foreach ITEM,$$(LIST_$(1)),$$(BIN)/$$(ITEM).$(1))
$$(BIN)/all$(1)s : $$(ALL_$(1))
$$(BIN)/allall : $$(BIN)/all$(1)s
all$(1)s : $$(BIN)/all$(1)s
allall : $$(BIN)/allall
Expand Down
8 changes: 3 additions & 5 deletions src/arch/i386/Makefile.pcbios
Expand Up @@ -40,12 +40,10 @@ PAD_exe = $(PERL) $(PADIMG) --blksize=512
FINALISE_rom = $(PERL) $(FIXROM)
FINALISE_mrom = $(FINALISE_rom)

# Add per-ROM targets for "allroms"
# Use $(ROMS) rather than $(DRIVERS) for "allroms" and "allmroms"
#
$(BIN)/allroms : $(foreach ROM,$(ROMS),$(BIN)/$(ROM).rom)
$(BIN)/allmroms : $(foreach ROM,$(ROMS),$(BIN)/$(ROM).mrom)
allroms : $(BIN)/allroms
allmroms : $(BIN)/allmroms
LIST_NAME_rom := ROMS
LIST_NAME_mrom := ROMS

# rule to make a non-emulation ISO boot image
NON_AUTO_MEDIA += iso
Expand Down
10 changes: 10 additions & 0 deletions src/arch/x86/Makefile.efi
Expand Up @@ -12,6 +12,8 @@ LDFLAGS += -q -S
#
NON_AUTO_MEDIA += efi
NON_AUTO_MEDIA += efidrv
NON_AUTO_MEDIA += drv.efi
NON_AUTO_MEDIA += efirom

# Rules for building EFI files
#
Expand All @@ -23,6 +25,14 @@ $(BIN)/%.efidrv : $(BIN)/%.efidrv.tmp $(ELF2EFI)
$(QM)$(ECHO) " [FINISH] $@"
$(Q)$(ELF2EFI) --subsystem=11 $< $@

$(BIN)/%.drv.efi : $(BIN)/%.efidrv
$(QM)$(ECHO) " [FINISH] $@"
$(Q)$(CP) $< $@

$(BIN)/%.efirom : $(BIN)/%.efidrv $(EFIROM)
$(QM)$(ECHO) " [FINISH] $@"
$(Q)$(EFIROM) -v $(TGT_PCI_VENDOR) -d $(TGT_PCI_DEVICE) $< $@

$(BIN)/efidrv.cab : $(BIN)/alldrv.efis # $(ALL_drv.efi) is not yet defined
$(QM)$(ECHO) " [CAB] $@"
$(Q)$(LCAB) -n -q $(ALL_drv.efi) $@

0 comments on commit dbea47c

Please sign in to comment.