mirror of
https://github.com/ipxe/ipxe
synced 2026-01-29 04:18:38 +03:00
When building an EFI ROM image for which no PCI vendor/device ID is
applicable (e.g. bin-x86_64-efi/ipxe.efirom), the build process will
currently construct a command such as
./util/efirom -v -d -c bin-x86_64-efi/ipxe.efidrv \
bin-x86_64-efi/ipxe.efirom
which gets interpreted as a vendor ID of "-0xd" (i.e. 0xfff3, after
truncation to 16 bits).
Fix by using an explicit zero ID when no applicable ID exists, as is
already done when constructing BIOS ROM images.
Reported-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
56 lines
1.4 KiB
Makefile
56 lines
1.4 KiB
Makefile
# -*- makefile -*- : Force emacs to use Makefile mode
|
|
|
|
# Enable stack protection if available
|
|
#
|
|
SPG_TEST = $(CC) -fstack-protector-strong -mstack-protector-guard=global \
|
|
-x c -c /dev/null -o /dev/null >/dev/null 2>&1
|
|
SPG_FLAGS := $(shell $(SPG_TEST) && $(ECHO) '-fstack-protector-strong ' \
|
|
'-mstack-protector-guard=global')
|
|
CFLAGS += $(SPG_FLAGS)
|
|
|
|
# The EFI linker script
|
|
#
|
|
LDSCRIPT = scripts/efi.lds
|
|
|
|
# Retain relocation information for elf2efi
|
|
#
|
|
LDFLAGS += -q -S
|
|
|
|
# Media types.
|
|
#
|
|
NON_AUTO_MEDIA += efi
|
|
NON_AUTO_MEDIA += efidrv
|
|
NON_AUTO_MEDIA += drv.efi
|
|
NON_AUTO_MEDIA += efirom
|
|
|
|
# Include SNP driver in the all-drivers build
|
|
#
|
|
DRIVERS_net += snp
|
|
|
|
# Rules for building EFI files
|
|
#
|
|
$(BIN)/%.efi : $(BIN)/%.efi.tmp $(ELF2EFI)
|
|
$(QM)$(ECHO) " [FINISH] $@"
|
|
$(Q)$(ELF2EFI) --subsystem=10 $< $@
|
|
|
|
$(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 $(firstword $(TGT_PCI_VENDOR) 0) \
|
|
-d $(firstword $(TGT_PCI_DEVICE) 0) -c $< $@
|
|
|
|
$(BIN)/efidrv.cab : $(BIN)/alldrv.efis # $(ALL_drv.efi) is not yet defined
|
|
$(QM)$(ECHO) " [CAB] $@"
|
|
$(Q)$(LCAB) -n -q $(ALL_drv.efi) $@
|
|
|
|
$(BIN)/%.iso $(BIN)/%.usb : $(BIN)/%.efi util/genfsimg
|
|
$(QM)$(ECHO) " [GENFSIMG] $@"
|
|
$(Q)util/genfsimg -o $@ $<
|