qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] edk2: get version + date from git submodule
@ 2024-03-27 10:24 Gerd Hoffmann
  2024-03-27 10:24 ` [PATCH v2 1/3] " Gerd Hoffmann
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2024-03-27 10:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Philippe Mathieu-Daudé

v2 changes:
 - store version information in git

Gerd Hoffmann (3):
  edk2: get version + date from git submodule
  edk2: commit version info
  edk2/seabios: use common extra version

 roms/Makefile     | 25 ++++++++++++++++++-------
 roms/edk2-version |  2 ++
 2 files changed, 20 insertions(+), 7 deletions(-)
 create mode 100644 roms/edk2-version

-- 
2.44.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/3] edk2: get version + date from git submodule
  2024-03-27 10:24 [PATCH v2 0/3] edk2: get version + date from git submodule Gerd Hoffmann
@ 2024-03-27 10:24 ` Gerd Hoffmann
  2024-04-09 14:23   ` Peter Maydell
  2024-03-27 10:24 ` [PATCH v2 2/3] edk2: commit version info Gerd Hoffmann
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Gerd Hoffmann @ 2024-03-27 10:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Philippe Mathieu-Daudé

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.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 roms/Makefile | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/roms/Makefile b/roms/Makefile
index edc234a0e886..783a5cab4f4c 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -52,6 +52,8 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
 #
 EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
 
+-include edk2-version
+
 default help:
 	@echo "nothing is build by default"
 	@echo "available build targets:"
@@ -147,10 +149,19 @@ skiboot:
 	$(MAKE) -C skiboot CROSS=$(powerpc64_cross_prefix)
 	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 \
-		--version-override "edk2-stable202302-for-qemu" \
-		--release-date "03/01/2023"
+		--version-override "$(EDK2_STABLE)-for-qemu" \
+		--release-date "$(EDK2_DATE)" \
+		--silent --no-logs
 	rm -f ../pc-bios/edk2-*.fd.bz2
 	bzip2 --verbose ../pc-bios/edk2-*.fd
 
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/3] edk2: commit version info
  2024-03-27 10:24 [PATCH v2 0/3] edk2: get version + date from git submodule Gerd Hoffmann
  2024-03-27 10:24 ` [PATCH v2 1/3] " Gerd Hoffmann
@ 2024-03-27 10:24 ` Gerd Hoffmann
  2024-03-27 10:24 ` [PATCH v2 3/3] edk2/seabios: use common extra version Gerd Hoffmann
  2024-04-09 14:20 ` [PATCH v2 0/3] edk2: get version + date from git submodule Peter Maydell
  3 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2024-03-27 10:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Philippe Mathieu-Daudé

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 roms/edk2-version | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 roms/edk2-version

diff --git a/roms/edk2-version b/roms/edk2-version
new file mode 100644
index 000000000000..1594ed8c4de9
--- /dev/null
+++ b/roms/edk2-version
@@ -0,0 +1,2 @@
+EDK2_STABLE = edk2-stable202402
+EDK2_DATE = 02/14/2024
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/3] edk2/seabios: use common extra version
  2024-03-27 10:24 [PATCH v2 0/3] edk2: get version + date from git submodule Gerd Hoffmann
  2024-03-27 10:24 ` [PATCH v2 1/3] " Gerd Hoffmann
  2024-03-27 10:24 ` [PATCH v2 2/3] edk2: commit version info Gerd Hoffmann
@ 2024-03-27 10:24 ` Gerd Hoffmann
  2024-04-09 14:20 ` [PATCH v2 0/3] edk2: get version + date from git submodule Peter Maydell
  3 siblings, 0 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2024-03-27 10:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Philippe Mathieu-Daudé

Bring a bit more consistency into the naming.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 roms/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/roms/Makefile b/roms/Makefile
index 783a5cab4f4c..dfed2b216a1e 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -41,8 +41,8 @@ x86_64_cross_prefix := $(call find-cross-prefix,x86_64)
 riscv32_cross_prefix := $(call find-cross-prefix,riscv32)
 riscv64_cross_prefix := $(call find-cross-prefix,riscv64)
 
-# tag our seabios builds
-SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
+# tag our firmware builds
+FIRMWARE_EXTRAVERSION = -prebuilt.qemu.org
 
 #
 # EfiRom utility is shipped with edk2 / tianocore, in BaseTools/
@@ -93,12 +93,12 @@ build-seabios-config-%: config.%
 	mkdir -p seabios/builds/$*
 	cp $< seabios/builds/$*/.config
 	$(MAKE) -C seabios \
-		EXTRAVERSION=$(SEABIOS_EXTRAVERSION) \
+		EXTRAVERSION=$(FIRMWARE_EXTRAVERSION) \
 		CROSS_PREFIX=$(x86_64_cross_prefix) \
 		KCONFIG_CONFIG=$(CURDIR)/seabios/builds/$*/.config \
 		OUT=$(CURDIR)/seabios/builds/$*/ oldnoconfig
 	$(MAKE) -C seabios \
-		EXTRAVERSION=$(SEABIOS_EXTRAVERSION) \
+		EXTRAVERSION=$(FIRMWARE_EXTRAVERSION) \
 		CROSS_PREFIX=$(x86_64_cross_prefix) \
 		KCONFIG_CONFIG=$(CURDIR)/seabios/builds/$*/.config \
 		OUT=$(CURDIR)/seabios/builds/$*/ all
@@ -159,7 +159,7 @@ edk2-version: edk2
 
 efi: edk2-version
 	$(PYTHON) edk2-build.py --config edk2-build.config \
-		--version-override "$(EDK2_STABLE)-for-qemu" \
+		--version-override "$(EDK2_STABLE)$(FIRMWARE_EXTRAVERSION)" \
 		--release-date "$(EDK2_DATE)" \
 		--silent --no-logs
 	rm -f ../pc-bios/edk2-*.fd.bz2
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/3] edk2: get version + date from git submodule
  2024-03-27 10:24 [PATCH v2 0/3] edk2: get version + date from git submodule Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2024-03-27 10:24 ` [PATCH v2 3/3] edk2/seabios: use common extra version Gerd Hoffmann
@ 2024-04-09 14:20 ` Peter Maydell
  3 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2024-04-09 14:20 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, Philippe Mathieu-Daudé

On Wed, 27 Mar 2024 at 10:26, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> v2 changes:
>  - store version information in git
>
> Gerd Hoffmann (3):
>   edk2: get version + date from git submodule
>   edk2: commit version info
>   edk2/seabios: use common extra version
>
>  roms/Makefile     | 25 ++++++++++++++++++-------
>  roms/edk2-version |  2 ++
>  2 files changed, 20 insertions(+), 7 deletions(-)
>  create mode 100644 roms/edk2-version

Series
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 1/3] edk2: get version + date from git submodule
  2024-03-27 10:24 ` [PATCH v2 1/3] " Gerd Hoffmann
@ 2024-04-09 14:23   ` Peter Maydell
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2024-04-09 14:23 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, Philippe Mathieu-Daudé

On Wed, 27 Mar 2024 at 10:26, Gerd Hoffmann <kraxel@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.  Store in edk2-version, so this can be committed to
> the repo and is present in tarballs too.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  roms/Makefile | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/roms/Makefile b/roms/Makefile
> index edc234a0e886..783a5cab4f4c 100644
> --- a/roms/Makefile
> +++ b/roms/Makefile
> @@ -52,6 +52,8 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
>  #
>  EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
>
> +-include edk2-version
> +
>  default help:
>         @echo "nothing is build by default"
>         @echo "available build targets:"
> @@ -147,10 +149,19 @@ skiboot:
>         $(MAKE) -C skiboot CROSS=$(powerpc64_cross_prefix)
>         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

Do we actually need this dependency, by the way? I think Make
will rebuild edk2-version regardless because it's included
(and it would be too late to rebuild it as merely a dependency
of 'efi' here).

>         $(PYTHON) edk2-build.py --config edk2-build.config \
> -               --version-override "edk2-stable202302-for-qemu" \
> -               --release-date "03/01/2023"
> +               --version-override "$(EDK2_STABLE)-for-qemu" \
> +               --release-date "$(EDK2_DATE)" \
> +               --silent --no-logs
>         rm -f ../pc-bios/edk2-*.fd.bz2
>         bzip2 --verbose ../pc-bios/edk2-*.fd
>
> --
> 2.44.0

-- PMM


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-04-09 14:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-27 10:24 [PATCH v2 0/3] edk2: get version + date from git submodule Gerd Hoffmann
2024-03-27 10:24 ` [PATCH v2 1/3] " Gerd Hoffmann
2024-04-09 14:23   ` Peter Maydell
2024-03-27 10:24 ` [PATCH v2 2/3] edk2: commit version info Gerd Hoffmann
2024-03-27 10:24 ` [PATCH v2 3/3] edk2/seabios: use common extra version Gerd Hoffmann
2024-04-09 14:20 ` [PATCH v2 0/3] edk2: get version + date from git submodule Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).