edk2: get version + date from git submodule
Turned out hard-coding version and date in the Makefile wasn't a bright idea. Updating it on edk2 updates is easily forgotten. Fetch the info from git instead. Store in edk2-version, so this can be committed to the repo and is present in tarballs too. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-ID: <20240327102448.61877-2-kraxel@redhat.com>
This commit is contained in:
parent
e5c6528dce
commit
6539c73dcc
@ -52,6 +52,8 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
|
|||||||
#
|
#
|
||||||
EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
|
EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
|
||||||
|
|
||||||
|
-include edk2-version
|
||||||
|
|
||||||
default help:
|
default help:
|
||||||
@echo "nothing is build by default"
|
@echo "nothing is build by default"
|
||||||
@echo "available build targets:"
|
@echo "available build targets:"
|
||||||
@ -147,10 +149,19 @@ skiboot:
|
|||||||
$(MAKE) -C skiboot CROSS=$(powerpc64_cross_prefix)
|
$(MAKE) -C skiboot CROSS=$(powerpc64_cross_prefix)
|
||||||
cp skiboot/skiboot.lid ../pc-bios/skiboot.lid
|
cp skiboot/skiboot.lid ../pc-bios/skiboot.lid
|
||||||
|
|
||||||
efi:
|
edk2-version: edk2
|
||||||
|
if test -e edk2/.git; then \
|
||||||
|
echo "EDK2_STABLE = $$(cd edk2; git describe --tags --match 'edk2-stable*')" > $@; \
|
||||||
|
echo "EDK2_DATE = $$(cd edk2; git log -1 --pretty='format:%cd' --date='format:%m/%d/%Y')" >> $@; \
|
||||||
|
else \
|
||||||
|
touch $@; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
efi: edk2-version
|
||||||
$(PYTHON) edk2-build.py --config edk2-build.config \
|
$(PYTHON) edk2-build.py --config edk2-build.config \
|
||||||
--version-override "edk2-stable202302-for-qemu" \
|
--version-override "$(EDK2_STABLE)-for-qemu" \
|
||||||
--release-date "03/01/2023"
|
--release-date "$(EDK2_DATE)" \
|
||||||
|
--silent --no-logs
|
||||||
rm -f ../pc-bios/edk2-*.fd.bz2
|
rm -f ../pc-bios/edk2-*.fd.bz2
|
||||||
bzip2 --verbose ../pc-bios/edk2-*.fd
|
bzip2 --verbose ../pc-bios/edk2-*.fd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user