qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/4] Edk2 20240409 patches
@ 2024-04-09 16:29 Gerd Hoffmann
  2024-04-09 16:29 ` [PULL 1/4] edk2: get version + date from git submodule Gerd Hoffmann
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2024-04-09 16:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Philippe Mathieu-Daudé, Peter Maydell

The following changes since commit e5c6528dce86d7a9ada7ecf02fcb7b8560955131:

  Update version for v9.0.0-rc2 release (2024-04-02 20:59:43 +0100)

are available in the Git repository at:

  https://gitlab.com/kraxel/qemu.git tags/edk2-20240409-pull-request

for you to fetch changes up to e3404e01c7f74efdc3440ddfd339d67bf7a8410e:

  edk2: rebuild binaries with correct version information (2024-04-09 18:21:23 +0200)

----------------------------------------------------------------
edk2: fix version information, rebuild binaries.

----------------------------------------------------------------

Gerd Hoffmann (4):
  edk2: get version + date from git submodule
  edk2: commit version info
  edk2/seabios: use common extra version
  edk2: rebuild binaries with correct version information

 pc-bios/edk2-aarch64-code.fd.bz2       | Bin 1589310 -> 1588976 bytes
 pc-bios/edk2-arm-code.fd.bz2           | Bin 1571693 -> 1571639 bytes
 pc-bios/edk2-i386-code.fd.bz2          | Bin 1775832 -> 1775230 bytes
 pc-bios/edk2-i386-secure-code.fd.bz2   | Bin 1876986 -> 1877268 bytes
 pc-bios/edk2-riscv-code.fd.bz2         | Bin 1289160 -> 1289337 bytes
 pc-bios/edk2-x86_64-code.fd.bz2        | Bin 1892372 -> 1892766 bytes
 pc-bios/edk2-x86_64-microvm.fd.bz2     | Bin 1785258 -> 1785290 bytes
 pc-bios/edk2-x86_64-secure-code.fd.bz2 | Bin 2214892 -> 1969096 bytes
 roms/Makefile                          |  25 ++++++++++++++++++-------
 roms/edk2-version                      |   2 ++
 10 files changed, 20 insertions(+), 7 deletions(-)
 create mode 100644 roms/edk2-version

-- 
2.44.0



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

* [PULL 1/4] edk2: get version + date from git submodule
  2024-04-09 16:29 [PULL 0/4] Edk2 20240409 patches Gerd Hoffmann
@ 2024-04-09 16:29 ` Gerd Hoffmann
  2024-04-09 18:02   ` Michael Tokarev
  2024-04-09 16:29 ` [PULL 2/4] edk2: commit version info Gerd Hoffmann
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Gerd Hoffmann @ 2024-04-09 16:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Philippe Mathieu-Daudé, Peter Maydell

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>
---
 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] 7+ messages in thread

* [PULL 2/4] edk2: commit version info
  2024-04-09 16:29 [PULL 0/4] Edk2 20240409 patches Gerd Hoffmann
  2024-04-09 16:29 ` [PULL 1/4] edk2: get version + date from git submodule Gerd Hoffmann
@ 2024-04-09 16:29 ` Gerd Hoffmann
  2024-04-09 16:29 ` [PULL 3/4] edk2/seabios: use common extra version Gerd Hoffmann
  2024-04-09 21:29 ` [PULL 0/4] Edk2 20240409 patches Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2024-04-09 16:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Philippe Mathieu-Daudé, Peter Maydell

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20240327102448.61877-3-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] 7+ messages in thread

* [PULL 3/4] edk2/seabios: use common extra version
  2024-04-09 16:29 [PULL 0/4] Edk2 20240409 patches Gerd Hoffmann
  2024-04-09 16:29 ` [PULL 1/4] edk2: get version + date from git submodule Gerd Hoffmann
  2024-04-09 16:29 ` [PULL 2/4] edk2: commit version info Gerd Hoffmann
@ 2024-04-09 16:29 ` Gerd Hoffmann
  2024-04-09 21:29 ` [PULL 0/4] Edk2 20240409 patches Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2024-04-09 16:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann, Philippe Mathieu-Daudé, Peter Maydell

Bring a bit more consistency into the naming.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20240327102448.61877-4-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] 7+ messages in thread

* Re: [PULL 1/4] edk2: get version + date from git submodule
  2024-04-09 16:29 ` [PULL 1/4] edk2: get version + date from git submodule Gerd Hoffmann
@ 2024-04-09 18:02   ` Michael Tokarev
  2024-04-09 18:39     ` Peter Maydell
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Tokarev @ 2024-04-09 18:02 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel; +Cc: Philippe Mathieu-Daudé, Peter Maydell

09.04.2024 19:29, Gerd Hoffmann:
> 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.

This too,
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2233


> +-include edk2-version

> +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

edk2-version will become a stray file in the source dir, not cleaned up.
But since this code path is only evaluated once, it is trivial to inline
it, in a way similar to the first version.

BTW, git has -C option instead of using `cd'.

So it goes like this:

EDK2_STABLE = $(shell [ ! -d edk2/.git ] || git -C edk2 describe --tags --match 'edk2-stable*')

ditto for EDK2_DATE.

> +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)" \

How it will look like if there's no edk2/.git, for example, when run in
extracted release tarball, with empty EDK2_STABLE and EKD2_DATE?

Should these values be a part of release tarball maybe?
Or maybe it's better to base EKD2_{DATE|VERSION} on qemu date/version in
this case?

Thanks,

/mjt


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

* Re: [PULL 1/4] edk2: get version + date from git submodule
  2024-04-09 18:02   ` Michael Tokarev
@ 2024-04-09 18:39     ` Peter Maydell
  0 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2024-04-09 18:39 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: Gerd Hoffmann, qemu-devel, Philippe Mathieu-Daudé

On Tue, 9 Apr 2024 at 19:02, Michael Tokarev <mjt@tls.msk.ru> wrote:
>
> 09.04.2024 19:29, Gerd Hoffmann:
> > +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)" \
>
> How it will look like if there's no edk2/.git, for example, when run in
> extracted release tarball, with empty EDK2_STABLE and EKD2_DATE?
>
> Should these values be a part of release tarball maybe?
> Or maybe it's better to base EKD2_{DATE|VERSION} on qemu date/version in
> this case?

Patch 2 commits the edk2-version file, so it should end up
in the release tarball that way. (Effectively it becomes an
output of the "build the roms" process, same as the edk2 blobs
themselves.)

thanks
-- PMM


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

* Re: [PULL 0/4] Edk2 20240409 patches
  2024-04-09 16:29 [PULL 0/4] Edk2 20240409 patches Gerd Hoffmann
                   ` (2 preceding siblings ...)
  2024-04-09 16:29 ` [PULL 3/4] edk2/seabios: use common extra version Gerd Hoffmann
@ 2024-04-09 21:29 ` Peter Maydell
  3 siblings, 0 replies; 7+ messages in thread
From: Peter Maydell @ 2024-04-09 21:29 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-devel, Philippe Mathieu-Daudé

On Tue, 9 Apr 2024 at 17:29, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> The following changes since commit e5c6528dce86d7a9ada7ecf02fcb7b8560955131:
>
>   Update version for v9.0.0-rc2 release (2024-04-02 20:59:43 +0100)
>
> are available in the Git repository at:
>
>   https://gitlab.com/kraxel/qemu.git tags/edk2-20240409-pull-request
>
> for you to fetch changes up to e3404e01c7f74efdc3440ddfd339d67bf7a8410e:
>
>   edk2: rebuild binaries with correct version information (2024-04-09 18:21:23 +0200)
>
> ----------------------------------------------------------------
> edk2: fix version information, rebuild binaries.
>
> ----------------------------------------------------------------
>
> Gerd Hoffmann (4):
>   edk2: get version + date from git submodule
>   edk2: commit version info
>   edk2/seabios: use common extra version
>   edk2: rebuild binaries with correct version information


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/9.0
for any user-visible changes.

-- PMM


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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-09 16:29 [PULL 0/4] Edk2 20240409 patches Gerd Hoffmann
2024-04-09 16:29 ` [PULL 1/4] edk2: get version + date from git submodule Gerd Hoffmann
2024-04-09 18:02   ` Michael Tokarev
2024-04-09 18:39     ` Peter Maydell
2024-04-09 16:29 ` [PULL 2/4] edk2: commit version info Gerd Hoffmann
2024-04-09 16:29 ` [PULL 3/4] edk2/seabios: use common extra version Gerd Hoffmann
2024-04-09 21:29 ` [PULL 0/4] Edk2 20240409 patches 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).