On Mon, Mar 25, 2024 at 02:55:11PM +0000, Peter Maydell wrote: > On Mon, 25 Mar 2024 at 14:45, Gerd Hoffmann <kra...@redhat.com> wrote: > > > > 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. > > > > Signed-off-by: Gerd Hoffmann <kra...@redhat.com> > > --- > > roms/Makefile | 7 +++++-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/roms/Makefile b/roms/Makefile > > index edc234a0e886..534eba17ebd0 100644 > > --- a/roms/Makefile > > +++ b/roms/Makefile > > @@ -51,6 +51,8 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org" > > # efi ia32, efi x64) into a single rom binary. > > # > > EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom > > +EDK2_STABLE = $(shell cd edk2; git describe --tags --match 'edk2-stable*') > > +EDK2_DATE = $(shell cd edk2; git show --pretty='format:%cd' > > --date='format:%m/%d/%Y'| head -1) > > I don't think there's any guarantee that the user has 'git' > installed. scripts/qemu-version avoids using "git describe" > unless it's building in a git tree.
Hmm. Have to figure something else then I guess. > You can avoid the "| head -1" by using > git log -1 --pretty='format:%cd' --date='format:%m/%d/%Y' > I think. Works. Thanks. > Also, does EDK2 really want month/day/year? Typically silly > choice if so :-) Yes. It's the smbios spec being silly btw, this lands more or less directly in /sys/class/dmi/id/bios_date. edk2 itself doesn't care. take care, Gerd