Skip to content

Commit 7a85634

Browse files
committed
[nrf noup] build: fix TF-M version
The TF-M build system retrieves the latest tag to figure out the TF-M version. It ends up being wrong because in some cases we don't have the latest tags from upstream For example for TF-M 2.1.2 the latest tag was TF-Mv2.1.0, probably because between the two versions upmerges have been done with cherry picks instead of upstream tag merging. Completely stop relying on the tags and only use TFM_VERSION_MANUAL as the version. This fixes the TF-M version printed on boot. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
1 parent 4623386 commit 7a85634

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

cmake/version.cmake

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@
88
# The 'TFM_VERSION_MANUAL' is used for fallback when Git tags are not available
99
set(TFM_VERSION_MANUAL "2.2.0")
1010

11-
execute_process(COMMAND git describe --tags --always
12-
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
13-
OUTPUT_VARIABLE TFM_VERSION_FULL
14-
OUTPUT_STRIP_TRAILING_WHITESPACE
15-
RESULTS_VARIABLE GIT_RESULT)
16-
17-
if(GIT_RESULT EQUAL 128)
11+
if(TRUE)
1812
# Git execution fails.
1913
# Applying a manual version assuming the code tree is a local copy.
2014
set(TFM_VERSION_FULL "v${TFM_VERSION_MANUAL}")

0 commit comments

Comments
 (0)