aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile.housekeeping
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2014-08-21 16:34:26 +0100
committerMichael Brown <mcb30@ipxe.org>2014-08-22 17:34:07 +0100
commit705907f9a9f4ba4f8f3bcb806ee18cd457d1dffb (patch)
tree7b3862b12e923fb1e7451aa278145d6f5a28e6c7 /src/Makefile.housekeeping
parent5b72cf055c6cf749648e8c914b9fc8f21ea69ca9 (diff)
downloadipxe-705907f9a9f4ba4f8f3bcb806ee18cd457d1dffb.tar.gz
[build] Allow ISA ROMs to be built
The build process has for a long time assumed that every ROM is a PCI ROM, and will always include the PCI header and PCI-related functionality (such as checking the PCI BIOS version, including the PCI bus:dev.fn address within the ROM product name string, etc.). While real ISA cards are no longer in use, some virtualisation environments (notably VirtualBox) have support only for ISA ROMs. This can cause problems: in particular, VirtualBox will call our initialisation entry point with random garbage in %ax, which we then treat as the PCI bus:dev.fn address of the autoboot device: this generally prevents the default boot sequence from using any network devices. Create .isarom and .pcirom prefixes which can be used to explicitly specify the type of ROM to be created. (Note that the .mrom prefix always implies a PCI ROM, since the .mrom mechanism relies on reconfiguring PCI BARs.) Make .rom a magic prefix which will automatically select the appropriate PCI or ISA ROM prefix for ROMs defined via a PCI_ROM() or ISA_ROM() macro. To maintain backwards compatibility, we default to building a PCI ROM for anything which is not directly derived from a PCI_ROM() or ISA_ROM() macro (e.g. bin/intel.rom). Add a selection of targets to "make everything" to ensure that the (relatively obscure) ISA ROM build process is included within the per-commit QA checks. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r--src/Makefile.housekeeping7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 5af4958d3..0e490f61f 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -902,19 +902,22 @@ CLEANUP += $(BIN)/NIC # Doesn't match the $(BIN)/*.* pattern
# derive the variables:
#
# TGT_ELEMENTS : the elements of the target (e.g. "dfe538 prism2_pci")
-# TGT_PREFIX : the prefix type (e.g. "rom")
+# TGT_PREFIX : the prefix type (e.g. "pcirom")
# TGT_DRIVERS : the driver for each element (e.g. "rtl8139 prism2_pci")
# TGT_ROM_NAME : the ROM name (e.g. "dfe538")
#
DRIVERS_ipxe = $(DRIVERS)
CARD_DRIVER = $(firstword $(DRIVER_$(1)) $(1))
TGT_ELEMENTS = $(subst --, ,$(firstword $(subst ., ,$(notdir $@))))
-TGT_PREFIX = $(word 2,$(subst ., ,$(notdir $@)))
TGT_ROM_NAME = $(firstword $(TGT_ELEMENTS))
TGT_DRIVERS = $(strip $(if $(DRIVERS_$(TGT_ROM_NAME)), \
$(DRIVERS_$(TGT_ROM_NAME)), \
$(foreach TGT_ELEMENT,$(TGT_ELEMENTS), \
$(call CARD_DRIVER,$(TGT_ELEMENT))) ))
+TGT_PREFIX_NAME = $(word 2,$(subst ., ,$(notdir $@)))
+TGT_PREFIX = $(strip $(if $(filter rom,$(TGT_PREFIX_NAME)), \
+ $(ROM_TYPE_$(TGT_ROM_NAME))rom, \
+ $(TGT_PREFIX_NAME)))
# Look up ROM IDs for the current target
# (e.g. "bin/dfe538--prism2_pci.rom.tmp") and derive the variables: