]> git.proxmox.com Git - mirror_qemu.git/commitdiff
roms: build the EfiRom utility from the roms/edk2 submodule
authorLaszlo Ersek <lersek@redhat.com>
Mon, 4 Feb 2019 16:03:22 +0000 (17:03 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 21 Feb 2019 17:28:41 +0000 (12:28 -0500)
Building the EfiRom utility from "roms/edk2/BaseTools" should make
"roms/Makefile" more self-contained. Otherwise, we'd call the system-wide
EfiRom for building the combined iPXE option ROMs, but call the sibling
utilities from "roms/edk2/BaseTools" for building "roms/edk2" content.

Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
Cc: Shannon Zhao <shannon.zhaosl@gmail.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190204160325.4914-3-lersek@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
roms/Makefile

index a6043eff37e9f1ed862dae7b4617b16cb10f4c0d..78d5dd18c301931b79ceef35a6272c8aab171008 100644 (file)
@@ -47,10 +47,7 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
 # 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)
+EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
 
 default:
        @echo "nothing is build by default"
@@ -59,8 +56,7 @@ default:
        @echo "  vgabios        -- update vgabios binaries (seabios)"
        @echo "  sgabios        -- update sgabios binaries"
        @echo "  pxerom         -- update nic roms (bios only)"
-       @echo "  efirom         -- update nic roms (bios+efi, this needs"
-       @echo "                    the EfiRom utility from edk2 / tianocore)"
+       @echo "  efirom         -- update nic roms (bios+efi)"
        @echo "  slof           -- update slof.bin"
        @echo "  skiboot        -- update skiboot.lid"
        @echo "  u-boot.e500    -- update u-boot.e500"
@@ -106,7 +102,7 @@ pxe-rom-%: build-pxe-roms
 
 efirom: $(patsubst %,efi-rom-%,$(pxerom_variants))
 
-efi-rom-%: build-pxe-roms build-efi-roms
+efi-rom-%: build-pxe-roms build-efi-roms $(EFIROM)
        $(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 \
@@ -124,6 +120,8 @@ build-efi-roms: build-pxe-roms
                $(patsubst %,bin-i386-efi/%.efidrv,$(pxerom_targets)) \
                $(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets))
 
+$(EFIROM):
+       $(MAKE) -C edk2/BaseTools
 
 slof:
        $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu
@@ -150,6 +148,7 @@ clean:
        $(MAKE) -C sgabios clean
        rm -f sgabios/.depend
        $(MAKE) -C ipxe/src veryclean
+       $(MAKE) -C edk2/BaseTools clean
        $(MAKE) -C SLOF clean
        rm -rf u-boot/build.e500
        $(MAKE) -C u-boot-sam460ex distclean