2012-02-09 13:40:31 +04:00
|
|
|
|
2013-09-20 16:35:31 +04:00
|
|
|
vgabios_variants := stdvga cirrus vmware qxl isavga
|
|
|
|
vgabios_targets := $(subst -isavga,,$(patsubst %,vgabios-%.bin,$(vgabios_variants)))
|
2013-02-08 19:35:08 +04:00
|
|
|
pxerom_variants := e1000 eepro100 ne2k_pci pcnet rtl8139 virtio
|
2013-09-20 17:26:26 +04:00
|
|
|
pxerom_targets := 8086100e 80861209 10500940 10222000 10ec8139 1af41000
|
2013-02-08 19:35:08 +04:00
|
|
|
|
2013-02-26 19:45:58 +04:00
|
|
|
pxe-rom-e1000 efi-rom-e1000 : VID := 8086
|
|
|
|
pxe-rom-e1000 efi-rom-e1000 : DID := 100e
|
|
|
|
pxe-rom-eepro100 efi-rom-eepro100 : VID := 8086
|
|
|
|
pxe-rom-eepro100 efi-rom-eepro100 : DID := 1209
|
|
|
|
pxe-rom-ne2k_pci efi-rom-ne2k_pci : VID := 1050
|
|
|
|
pxe-rom-ne2k_pci efi-rom-ne2k_pci : DID := 0940
|
|
|
|
pxe-rom-pcnet efi-rom-pcnet : VID := 1022
|
|
|
|
pxe-rom-pcnet efi-rom-pcnet : DID := 2000
|
|
|
|
pxe-rom-rtl8139 efi-rom-rtl8139 : VID := 10ec
|
|
|
|
pxe-rom-rtl8139 efi-rom-rtl8139 : DID := 8139
|
|
|
|
pxe-rom-virtio efi-rom-virtio : VID := 1af4
|
|
|
|
pxe-rom-virtio efi-rom-virtio : DID := 1000
|
|
|
|
|
|
|
|
#
|
|
|
|
# EfiRom utility is shipped with edk2 / tianocore, in BaseTools/
|
|
|
|
#
|
|
|
|
# We need that to combine multiple images (legacy bios,
|
|
|
|
# efi ia32, efi x64) into a single rom binary.
|
|
|
|
#
|
|
|
|
# We try to find it in the path. You can also pass the location on
|
|
|
|
# the command line, i.e. "make EFIROM=/path/to/EfiRom efirom"
|
|
|
|
#
|
|
|
|
EFIROM ?= $(shell which EfiRom 2>/dev/null)
|
2012-02-09 13:40:31 +04:00
|
|
|
|
2012-02-09 13:40:31 +04:00
|
|
|
default:
|
|
|
|
@echo "nothing is build by default"
|
|
|
|
@echo "available build targets:"
|
|
|
|
@echo " bios -- update bios.bin (seabios)"
|
2012-02-09 13:40:31 +04:00
|
|
|
@echo " seavgabios -- update vgabios binaries (seabios)"
|
|
|
|
@echo " lgplvgabios -- update vgabios binaries (lgpl)"
|
2013-02-08 19:35:08 +04:00
|
|
|
@echo " pxerom -- update nic roms (bios only)"
|
2013-02-26 19:45:58 +04:00
|
|
|
@echo " efirom -- update nic roms (bios+efi, this needs"
|
|
|
|
@echo " the EfiRom utility from edk2 / tianocore)"
|
2012-02-09 13:40:31 +04:00
|
|
|
|
|
|
|
bios: config.seabios
|
|
|
|
sh configure-seabios.sh $<
|
|
|
|
make -C seabios out/bios.bin
|
|
|
|
cp seabios/out/bios.bin ../pc-bios/bios.bin
|
2012-11-30 19:24:40 +04:00
|
|
|
cp seabios/out/*dsdt.aml ../pc-bios/
|
2012-02-09 13:40:31 +04:00
|
|
|
|
|
|
|
seavgabios: $(patsubst %,seavgabios-%,$(vgabios_variants))
|
|
|
|
|
|
|
|
seavgabios-%: config.vga.%
|
|
|
|
sh configure-seabios.sh $<
|
|
|
|
make -C seabios out/vgabios.bin
|
|
|
|
cp seabios/out/vgabios.bin ../pc-bios/vgabios-$*.bin
|
|
|
|
|
2013-09-20 16:29:29 +04:00
|
|
|
|
2012-02-09 13:40:31 +04:00
|
|
|
lgplvgabios: $(patsubst %,lgplvgabios-%,$(vgabios_variants))
|
|
|
|
|
2013-09-20 16:35:31 +04:00
|
|
|
lgplvgabios-isavga: build-lgplvgabios
|
|
|
|
cp vgabios/VGABIOS-lgpl-latest.bin ../pc-bios/vgabios.bin
|
2013-09-20 16:29:29 +04:00
|
|
|
lgplvgabios-%: build-lgplvgabios
|
2012-02-09 13:40:31 +04:00
|
|
|
cp vgabios/VGABIOS-lgpl-latest.$*.bin ../pc-bios/vgabios-$*.bin
|
2013-02-08 19:35:08 +04:00
|
|
|
|
2013-09-20 16:29:29 +04:00
|
|
|
build-lgplvgabios:
|
|
|
|
$(MAKE) $(MAKEFLAGS) -C vgabios $(vgabios_targets)
|
|
|
|
|
|
|
|
|
2013-02-08 19:35:08 +04:00
|
|
|
pxerom: $(patsubst %,pxe-rom-%,$(pxerom_variants))
|
|
|
|
|
2013-09-20 17:26:26 +04:00
|
|
|
pxe-rom-%: build-pxe-roms
|
2013-02-08 19:35:08 +04:00
|
|
|
cp ipxe/src/bin/$(VID)$(DID).rom ../pc-bios/pxe-$*.rom
|
2013-02-26 19:45:58 +04:00
|
|
|
|
|
|
|
efirom: $(patsubst %,efi-rom-%,$(pxerom_variants))
|
|
|
|
|
2013-09-20 17:26:26 +04:00
|
|
|
efi-rom-%: build-pxe-roms build-efi-roms
|
2013-02-26 19:45:58 +04:00
|
|
|
$(EFIROM) -f "0x$(VID)" -i "0x$(DID)" -l 0x02 \
|
|
|
|
-b ipxe/src/bin/$(VID)$(DID).rom \
|
|
|
|
-ec ipxe/src/bin-i386-efi/$(VID)$(DID).efidrv \
|
|
|
|
-ec ipxe/src/bin-x86_64-efi/$(VID)$(DID).efidrv \
|
|
|
|
-o ../pc-bios/efi-$*.rom
|
2013-03-25 12:07:40 +04:00
|
|
|
|
2013-09-20 17:26:26 +04:00
|
|
|
build-pxe-roms: ipxe/src/config/local/general.h
|
|
|
|
$(MAKE) $(MAKEFLAGS) -C ipxe/src GITVERSION="" \
|
|
|
|
$(patsubst %,bin/%.rom,$(pxerom_targets))
|
|
|
|
|
|
|
|
build-efi-roms: build-pxe-roms ipxe/src/config/local/general.h
|
|
|
|
$(MAKE) $(MAKEFLAGS) -C ipxe/src GITVERSION="" \
|
|
|
|
$(patsubst %,bin-i386-efi/%.efidrv,$(pxerom_targets)) \
|
|
|
|
$(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets))
|
|
|
|
|
2013-03-25 12:07:40 +04:00
|
|
|
ipxe/src/config/local/%: config.ipxe.%
|
|
|
|
cp $< $@
|
2013-09-20 17:34:27 +04:00
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf seabios/.config seabios/out
|
|
|
|
$(MAKE) $(MAKEFLAGS) -C vgabios clean
|
|
|
|
rm -f vgabios/VGABIOS-lgpl-latest*
|
|
|
|
$(MAKE) $(MAKEFLAGS) -C ipxe/src veryclean
|