roms: omit the git reference to h2
cover roms: omit the git reference to h2
Using git rev-parse doesn't make any sense for a source tarball distribution.
Switch to the process used by edk2: capture the version in a makefile instead.
Brian Cain (2):
roms: record the H2 commit in a file
pc-bios: rebuild H2 firmware
MAINTAINERS | 1 + pc-bios/README | 7 +++---- pc-bios/hexagon_booter_qcs6490_cdsp | Bin 285292 -> 285292 bytes pc-bios/hexagon_booter_sa8775p_cdsp | Bin 281224 -> 281224 bytes pc-bios/hexagon_booter_sa8797p_nsp0 | Bin 288904 -> 288904 bytes pc-bios/hexagon_booter_sc8480xp_nsp0 | Bin 288908 -> 288908 bytes pc-bios/hexagon_booter_sm8975_nsp | Bin 288900 -> 288900 bytes pc-bios/hexagon_loadlinux_qcs6490_cdsp | Bin 200428 -> 200428 bytes pc-bios/hexagon_loadlinux_sa8775p_cdsp | Bin 200456 -> 200456 bytes pc-bios/hexagon_loadlinux_sa8797p_nsp0 | Bin 208136 -> 208136 bytes pc-bios/hexagon_loadlinux_sc8480xp_nsp0 | Bin 208140 -> 208140 bytes pc-bios/hexagon_loadlinux_sm8975_nsp | Bin 208132 -> 208132 bytes roms/Makefile | 13 +++++++++++-- roms/hexagon-hypervisor-version | 1 + 14 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 roms/hexagon-hypervisor-version
Signature · 1 line
2.34.1
PATCH 1/2 roms: record the H2 commit in a file
The H2 build ID was derived by running git rev-parse, which fails when building from a source tarball. Leaving H2K_GIT_COMMIT as "0x" does not compile.
Instead we'll keep the commit in a tracked file, regenerate it when it's a submodule.
--- MAINTAINERS | 1 + roms/Makefile | 13 +++++++++++-- roms/hexagon-hypervisor-version | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 roms/hexagon-hypervisor-version
MAINTAINERS +1 -0
@@ -1399,6 +1399,7 @@ F: tests/qtest/qcom-dsp-test.c F: docs/devel/hexagon-sys.rst F: pc-bios/hexagon* F: roms/hexagon-hypervisor +F: roms/hexagon-hypervisor-version LoongArch Machines ------------------
roms/Makefile +11 -2
@@ -226,11 +226,20 @@ hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ hexagon_h2_loadlinux := hexagon-loadlinux-qcs6490-cdsp \ hexagon-loadlinux-sm8975-nsp hexagon-loadlinux-sa8775p-cdsp \ hexagon-loadlinux-sc8480xp-nsp0 hexagon-loadlinux-sa8797p-nsp0 +-include hexagon-hypervisor-version + +hexagon-hypervisor-version: hexagon-hypervisor + if test -e hexagon-hypervisor/.git; then \ + echo "H2K_COMMIT = $$(git -C hexagon-hypervisor rev-parse HEAD)" > $@; \ + else \ + touch $@; \ + fi + hexagon_h2_common_flags = USE_PKW=0 TARGET=opt NULL_ANGEL_TRAP=1 \ HMX_HLX_SUPPORT=1 \ H2K_LOAD_ADDR=0x9b800000 H2K_GUEST_START=0xa2000000 \ - H2K_GIT_COMMIT=0x$(shell git -C hexagon-hypervisor rev-parse --short=8 HEAD) \ - H2K_GIT_COMMIT_LONG=0x$(shell git -C hexagon-hypervisor rev-parse HEAD) \ + H2K_GIT_COMMIT=0x$(shell echo $(H2K_COMMIT) | cut -c1-8) \ + H2K_GIT_COMMIT_LONG=0x$(H2K_COMMIT) \ JFLAG=-j$(shell nproc) .PHONY: hexagon-qcs6490-cdsp hexagon-sm8975-nsp \
roms/hexagon-hypervisor-version new file +1 -0
@@ -0,0 +1 @@ +H2K_COMMIT = 23d5bde4313c1e63ba64dd5d7f542b1055188ef8
Signature · 1 line
2.34.1
Re: [PATCH 1/2] roms: record the H2 commit in a file
Quoted 34 lines · Brian Cain
The H2 build ID was derived by running
git rev-parse, which fails when building from a source tarball. LeavingH2K_GIT_COMMITas "0x" does not compile.Instead we'll keep the commit in a tracked file, regenerate it when it's a submodule.
Signed-off-by Brian Cain <[email protected]>--- MAINTAINERS | 1 + roms/Makefile | 13 +++++++++++-- roms/hexagon-hypervisor-version | 1 + 3 files changed, 13 insertions(+), 2 deletions(-)create mode 100644 roms/hexagon-hypervisor-version
MAINTAINERS +1
-0@@ -1399,6 +1399,7 @@ F: tests/qtest/qcom-dsp-test.c F: docs/devel/hexagon-sys.rst F: pc-bios/hexagon* F: roms/hexagon-hypervisor +F: roms/hexagon-hypervisor-version LoongArch Machines ------------------roms/Makefile +0
-0@@ -226,11 +226,20 @@ hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ hexagon_h2_loadlinux := hexagon-loadlinux-qcs6490-cdsp \ hexagon-loadlinux-sm8975-nsp hexagon-loadlinux-sa8775p-cdsp \
roms/Makefile hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ · line 237
Quoted 10 lines
roms/Makefile +9
-0hexagon-loadlinux-sc8480xp-nsp0 hexagon-loadlinux-sa8797p-nsp0 +-include hexagon-hypervisor-version + +hexagon-hypervisor-version: hexagon-hypervisor + if test -e hexagon-hypervisor/.git; then \ + echo "H2K_COMMIT = $$(git -C hexagon-hypervisor rev-parse HEAD)" > $@; \ + else \ + touch $@; \ + fi +
Maybe would be better to always read from the (existing) file, and compare content to give output. With this, we can catch the "updated the submodule but forgot to update the file" situation.
Quoted 17 lines
roms/Makefile +2
-2hexagon_h2_common_flags = USE_PKW=0 TARGET=opt NULL_ANGEL_TRAP=1 \ HMX_HLX_SUPPORT=1 \ H2K_LOAD_ADDR=0x9b800000 H2K_GUEST_START=0xa2000000 \ - H2K_GIT_COMMIT=0x$(shell git -C hexagon-hypervisor rev-parse --short=8 HEAD) \ - H2K_GIT_COMMIT_LONG=0x$(shell git -C hexagon-hypervisor rev-parse HEAD) \ + H2K_GIT_COMMIT=0x$(shell echo $(H2K_COMMIT) | cut -c1-8) \ + H2K_GIT_COMMIT_LONG=0x$(H2K_COMMIT) \ JFLAG=-j$(shell nproc) .PHONY: hexagon-qcs6490-cdsp hexagon-sm8975-nsp \roms/hexagon-hypervisor-version new file +1
-0@@ -0,0 +1 @@ +H2K_COMMIT = 23d5bde4313c1e63ba64dd5d7f542b1055188ef8
Re: [PATCH 1/2] roms: record the H2 commit in a file
Quoted 41 lines · Pierrick Bouvier
Quoted 40 lines · Brian Cain
The H2 build ID was derived by running
git rev-parse, which fails when building from a source tarball. LeavingH2K_GIT_COMMITas "0x" does not compile.Instead we'll keep the commit in a tracked file, regenerate it when it's a submodule.
Signed-off-by Brian Cain <[email protected]>--- MAINTAINERS | 1 + roms/Makefile | 13 +++++++++++-- roms/hexagon-hypervisor-version | 1 + 3 files changed, 13 insertions(+), 2 deletions(-)create mode 100644 roms/hexagon-hypervisor-version
MAINTAINERS +1
-0@@ -1399,6 +1399,7 @@ F: tests/qtest/qcom-dsp-test.c F: docs/devel/hexagon-sys.rst F: pc-bios/hexagon* F: roms/hexagon-hypervisor +F: roms/hexagon-hypervisor-version LoongArch Machines ------------------roms/Makefile +5
-0@@ -226,11 +226,20 @@ hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ hexagon_h2_loadlinux := hexagon-loadlinux-qcs6490-cdsp \ hexagon-loadlinux-sm8975-nsp hexagon-loadlinux-sa8775p-cdsp \ hexagon-loadlinux-sc8480xp-nsp0 hexagon-loadlinux-sa8797p-nsp0 +-include hexagon-hypervisor-version + +hexagon-hypervisor-version: hexagon-hypervisor + if test -e hexagon-hypervisor/.git; then \ + echo "H2K_COMMIT = $$(git -C hexagon-hypervisor rev-parse HEAD)" > $@; \
Quoted 9 lines
roms/Makefile hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ · line 237
Quoted 4 lines
roms/Makefile +4
-0+ else \ + touch $@; \ + fi +Maybe would be better to always read from the (existing) file, and compare content to give output. With this, we can catch the "updated the submodule but forgot to update the file" situation.
and compare content to *git* output.
Quoted 17 lines
Quoted 17 lines
roms/Makefile +2
-2hexagon_h2_common_flags = USE_PKW=0 TARGET=opt NULL_ANGEL_TRAP=1 \ HMX_HLX_SUPPORT=1 \ H2K_LOAD_ADDR=0x9b800000 H2K_GUEST_START=0xa2000000 \ - H2K_GIT_COMMIT=0x$(shell git -C hexagon-hypervisor rev-parse --short=8 HEAD) \ - H2K_GIT_COMMIT_LONG=0x$(shell git -C hexagon-hypervisor rev-parse HEAD) \ + H2K_GIT_COMMIT=0x$(shell echo $(H2K_COMMIT) | cut -c1-8) \ + H2K_GIT_COMMIT_LONG=0x$(H2K_COMMIT) \ JFLAG=-j$(shell nproc) .PHONY: hexagon-qcs6490-cdsp hexagon-sm8975-nsp \roms/hexagon-hypervisor-version new file +1
-0@@ -0,0 +1 @@ +H2K_COMMIT = 23d5bde4313c1e63ba64dd5d7f542b1055188ef8
Re: [PATCH 1/2] roms: record the H2 commit in a file
Quoted 53 lines · Pierrick Bouvier
Quoted 42 lines · Pierrick Bouvier
Quoted 41 lines · Brian Cain
The H2 build ID was derived by running
git rev-parse, which fails when building from a source tarball. LeavingH2K_GIT_COMMITas "0x" does not compile.Instead we'll keep the commit in a tracked file, regenerate it when it's a submodule.
Signed-off-by Brian Cain <[email protected]>---
MAINTAINERS | 1 + roms/Makefile | 13 +++++++++++-- roms/hexagon-hypervisor-version | 1 +3 files changed, 13 insertions(+), 2 deletions(-)create mode 100644 roms/hexagon-hypervisor-version
MAINTAINERS +0
-0@@ -1399,6 +1399,7 @@ F: tests/qtest/qcom-dsp-test.cF:
docs/devel/hexagon-sys.rst
F: pc-bios/hexagon*
F: roms/hexagon-hypervisor
+F: roms/hexagon-hypervisor-version
LoongArch Machines
------------------roms/Makefile +0
-0@@ -226,11 +226,20 @@ hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ hexagon_h2_loadlinux := hexagon-loadlinux-qcs6490-cdsp \ hexagon-loadlinux-sm8975-nsp hexagon-loadlinux-sa8775p-cdsp \hexagon-loadlinux-sc8480xp-nsp0 hexagon-loadlinux-sa8797p-nsp0 +-include hexagon-hypervisor-version
roms/Makefile +4
-0+ +hexagon-hypervisor-version: hexagon-hypervisor + if test -e hexagon-hypervisor/.git; then \ + echo "H2K_COMMIT = $$(git -C hexagon-hypervisor rev-parseHEAD)" > $@; \
Quoted 9 lines
Quoted 4 lines
+ else \
+ touch $@; \
+ fi
+Maybe would be better to always read from the (existing) file, and compare content to give output. With this, we can catch the "updated the submodule but forgot to update the file" situation.
Quoted 1 line
and compare content to *git* output.
Sure - that's fine with me - @Michael do you have a preference?
I just followed what edk2 was doing, assuming it was already satisfactory for the packaging/distro usage.
Quoted 20 lines
Quoted 19 lines
Quoted 19 lines
hexagon_h2_common_flags= USE_PKW=0 TARGET=opt NULL_ANGEL_TRAP=1 \
HMX_HLX_SUPPORT=1 \
H2K_LOAD_ADDR=0x9b800000 H2K_GUEST_START=0xa2000000 \
- H2K_GIT_COMMIT=0x$(shell git -C hexagon-hypervisor rev-parse --short=8 HEAD) \
- H2K_GIT_COMMIT_LONG=0x$(shell git -C hexagon-hypervisor rev-parse HEAD) \
+ H2K_GIT_COMMIT=0x$(shell echo $(H2K_COMMIT) | cut -c1-8) \
+ H2K_GIT_COMMIT_LONG=0x$(H2K_COMMIT) \
JFLAG=-j$(shell nproc)
.PHONY: hexagon-qcs6490-cdsp hexagon-sm8975-nsp \roms/hexagon-hypervisor-version new file +1
-0@@ -0,0 +1 @@ +H2K_COMMIT = 23d5bde4313c1e63ba64dd5d7f542b1055188ef8
Re: [PATCH 1/2] roms: record the H2 commit in a file
Quoted 5 lines · Brian Cain
Quoted 1 line · Pierrick Bouvier
and compare content to *git* output.
Sure - that's fine with me - @Michael do you have a preference?
I don't have any preferences here - it's up to you to make your own life as simple as possible.
Quoted 1 line
I just followed what edk2 was doing, assuming it was already satisfactory for the packaging/distro usage.
The original problem (addressing git repo when there's none) is solved either way. A problem with stale data is a different one :)
This is just a random string which means nothing. It would be better if it reflected reality - it might help in debugging for example. But for packaging it has no meaning at all.
Thanks,
/mjt
Re: [PATCH 1/2] roms: record the H2 commit in a file
In reply to Pierrick BouvierQuoted 41 lines · Pierrick Bouvier
Quoted 40 lines · Brian Cain
The H2 build ID was derived by running
git rev-parse, which fails when building from a source tarball. LeavingH2K_GIT_COMMITas "0x" does not compile.Instead we'll keep the commit in a tracked file, regenerate it when it's a submodule.
Signed-off-by Brian Cain <[email protected]>--- MAINTAINERS | 1 + roms/Makefile | 13 +++++++++++-- roms/hexagon-hypervisor-version | 1 + 3 files changed, 13 insertions(+), 2 deletions(-)create mode 100644 roms/hexagon-hypervisor-version
MAINTAINERS +1
-0@@ -1399,6 +1399,7 @@ F: tests/qtest/qcom-dsp-test.c F: docs/devel/hexagon-sys.rst F: pc-bios/hexagon* F: roms/hexagon-hypervisor +F: roms/hexagon-hypervisor-version LoongArch Machines ------------------roms/Makefile +5
-0@@ -226,11 +226,20 @@ hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ hexagon_h2_loadlinux := hexagon-loadlinux-qcs6490-cdsp \ hexagon-loadlinux-sm8975-nsp hexagon-loadlinux-sa8775p-cdsp \ hexagon-loadlinux-sc8480xp-nsp0 hexagon-loadlinux-sa8797p-nsp0 +-include hexagon-hypervisor-version + +hexagon-hypervisor-version: hexagon-hypervisor + if test -e hexagon-hypervisor/.git; then \ + echo "H2K_COMMIT = $$(git -C hexagon-hypervisor rev-parse HEAD)" > $@; \
Quoted 9 lines
roms/Makefile hexagon_h2_booters := hexagon-booter-qcs6490-cdsp \ · line 237
Quoted 4 lines
roms/Makefile +4
-0+ else \ + touch $@; \ + fi +Maybe would be better to always read from the (existing) file, and compare content to give output. With this, we can catch the "updated the submodule but forgot to update the file" situation.
and compare output to *git* output.
Quoted 17 lines
Quoted 17 lines
roms/Makefile +2
-2hexagon_h2_common_flags = USE_PKW=0 TARGET=opt NULL_ANGEL_TRAP=1 \ HMX_HLX_SUPPORT=1 \ H2K_LOAD_ADDR=0x9b800000 H2K_GUEST_START=0xa2000000 \ - H2K_GIT_COMMIT=0x$(shell git -C hexagon-hypervisor rev-parse --short=8 HEAD) \ - H2K_GIT_COMMIT_LONG=0x$(shell git -C hexagon-hypervisor rev-parse HEAD) \ + H2K_GIT_COMMIT=0x$(shell echo $(H2K_COMMIT) | cut -c1-8) \ + H2K_GIT_COMMIT_LONG=0x$(H2K_COMMIT) \ JFLAG=-j$(shell nproc) .PHONY: hexagon-qcs6490-cdsp hexagon-sm8975-nsp \roms/hexagon-hypervisor-version new file +1
-0@@ -0,0 +1 @@ +H2K_COMMIT = 23d5bde4313c1e63ba64dd5d7f542b1055188ef8
PATCH 2/2 pc-bios: rebuild H2 firmware
In reply to Brian CainRebuild the H2 images with the updated roms/Makefile. The H2 sources and build ID are unchanged.
--- pc-bios/README | 7 +++---- pc-bios/hexagon_booter_qcs6490_cdsp | Bin 285292 -> 285292 bytes pc-bios/hexagon_booter_sa8775p_cdsp | Bin 281224 -> 281224 bytes pc-bios/hexagon_booter_sa8797p_nsp0 | Bin 288904 -> 288904 bytes pc-bios/hexagon_booter_sc8480xp_nsp0 | Bin 288908 -> 288908 bytes pc-bios/hexagon_booter_sm8975_nsp | Bin 288900 -> 288900 bytes pc-bios/hexagon_loadlinux_qcs6490_cdsp | Bin 200428 -> 200428 bytes pc-bios/hexagon_loadlinux_sa8775p_cdsp | Bin 200456 -> 200456 bytes pc-bios/hexagon_loadlinux_sa8797p_nsp0 | Bin 208136 -> 208136 bytes pc-bios/hexagon_loadlinux_sc8480xp_nsp0 | Bin 208140 -> 208140 bytes pc-bios/hexagon_loadlinux_sm8975_nsp | Bin 208132 -> 208132 bytes 11 files changed, 3 insertions(+), 4 deletions(-)
pc-bios/README +3 -4
@@ -3,10 +3,9 @@ - hexagon_booter_<machine> and hexagon_loadlinux_<machine> are the H2 hypervisor firmware for the Hexagon machines. The sources are at - https://gitlab.com/qemu-project/hexagon-hypervisor, built from commit - 23d5bde4313c1e63ba64dd5d7f542b1055188ef8 with Hexagon SDK 6.7.0.0 - via "make -C roms hexagon-<machine>". H2 is distributed under the terms - given in "hexagon-hypervisor-license.txt". + https://gitlab.com/qemu-project/hexagon-hypervisor + built with Hexagon SDK 6.7.0.0 via "make -C roms hexagon-<machine>". + H2 is distributed under the terms given in "hexagon-hypervisor-license.txt". - The VGA BIOS and the Cirrus VGA BIOS come from the LGPL VGA bios project (http://www.nongnu.org/vgabios/).
pc-bios/hexagon_booter_qcs6490_cdsp binary +0 -0
pc-bios/hexagon_booter_sa8775p_cdsp binary +0 -0
pc-bios/hexagon_booter_sa8797p_nsp0 binary +0 -0
pc-bios/hexagon_booter_sc8480xp_nsp0 binary +0 -0
pc-bios/hexagon_booter_sm8975_nsp binary +0 -0
pc-bios/hexagon_loadlinux_qcs6490_cdsp binary +0 -0
pc-bios/hexagon_loadlinux_sa8775p_cdsp binary +0 -0
pc-bios/hexagon_loadlinux_sa8797p_nsp0 binary +0 -0
pc-bios/hexagon_loadlinux_sc8480xp_nsp0 binary +0 -0
pc-bios/hexagon_loadlinux_sm8975_nsp binary +0 -0
Signature · 1 line
2.34.1
Re: [PATCH 2/2] pc-bios: rebuild H2 firmware
Quoted 4 lines · Brian Cain
Rebuild the H2 images with the updated roms/Makefile. The H2 sources and build ID are unchanged.
Signed-off-by Brian Cain <[email protected]>
Quoted 14 lines
--- pc-bios/README | 7 +++---- pc-bios/hexagon_booter_qcs6490_cdsp | Bin 285292 -> 285292 bytes pc-bios/hexagon_booter_sa8775p_cdsp | Bin 281224 -> 281224 bytes pc-bios/hexagon_booter_sa8797p_nsp0 | Bin 288904 -> 288904 bytes pc-bios/hexagon_booter_sc8480xp_nsp0 | Bin 288908 -> 288908 bytes pc-bios/hexagon_booter_sm8975_nsp | Bin 288900 -> 288900 bytes pc-bios/hexagon_loadlinux_qcs6490_cdsp | Bin 200428 -> 200428 bytes pc-bios/hexagon_loadlinux_sa8775p_cdsp | Bin 200456 -> 200456 bytes pc-bios/hexagon_loadlinux_sa8797p_nsp0 | Bin 208136 -> 208136 bytes pc-bios/hexagon_loadlinux_sc8480xp_nsp0 | Bin 208140 -> 208140 bytes pc-bios/hexagon_loadlinux_sm8975_nsp | Bin 208132 -> 208132 bytes 11 files changed, 3 insertions(+), 4 deletions(-)