edk2: replace build scripts

Remove Makefile.edk2 and the edk2*.sh scripts and replace them
with a python script (which already handles fedora rpm builds)
and a config file for it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2023-03-09 11:21:27 +01:00
parent 9e8a55aa78
commit 22e11539e1
6 changed files with 511 additions and 528 deletions

View file

@ -126,25 +126,6 @@ build-efi-roms: build-pxe-roms
CROSS_COMPILE=$(x86_64_cross_prefix) \
$(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets))
# Build scripts can pass compiler/linker flags to the EDK2
# build tools via the EDK2_BASETOOLS_OPTFLAGS (CFLAGS) and
# EDK2_BASETOOLS_LDFLAGS (LDFLAGS) environment variables.
#
# Example:
#
# make -C roms \
# EDK2_BASETOOLS_OPTFLAGS='...' \
# EDK2_BASETOOLS_LDFLAGS='...' \
# efirom
#
edk2-basetools:
cd edk2/BaseTools && git submodule update --init --force \
Source/C/BrotliCompress/brotli
$(MAKE) -C edk2/BaseTools \
PYTHON_COMMAND=$${EDK2_PYTHON_COMMAND:-python3} \
EXTRA_OPTFLAGS='$(EDK2_BASETOOLS_OPTFLAGS)' \
EXTRA_LDFLAGS='$(EDK2_BASETOOLS_LDFLAGS)'
slof:
$(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu
cp SLOF/boot_rom.bin ../pc-bios/slof.bin
@ -165,8 +146,12 @@ skiboot:
$(MAKE) -C skiboot CROSS=$(powerpc64_cross_prefix)
cp skiboot/skiboot.lid ../pc-bios/skiboot.lid
efi: edk2-basetools
$(MAKE) -f Makefile.edk2
efi:
python3 edk2-build.py --config edk2-build.config \
--version-override "edk2-stable202302-for-qemu" \
--release-date "03/01/2023"
rm -f ../pc-bios/edk2-*.fd.bz2
bzip2 --verbose ../pc-bios/edk2-*.fd
opensbi32-generic:
$(MAKE) -C opensbi \
@ -200,7 +185,7 @@ clean:
rm -rf u-boot/build-e500
$(MAKE) -C u-boot-sam460ex distclean
$(MAKE) -C skiboot clean
$(MAKE) -f Makefile.edk2 clean
rm -rf Build
$(MAKE) -C opensbi clean
$(MAKE) -C qboot clean
$(MAKE) -C vbootrom clean