Skip to content

Commit 32c49d0

Browse files
povergoingcfriedt
authored andcommitted
cmake: armfvp: Add FVP min version check
After the fix of FVP_BaseR_AEMv8R booting issue, the minimum required version of FVP will be 11.16.16. Add an FVP minimal required version check in building time. When the ARMFVP_MIN_VERSION is set in board cmake file, the version check will be enabled and print a warning. Signed-off-by: Jaxson Han <[email protected]> Change-Id: Ibbade0c328b5e91b8830fb35cba6917f08aabbda (cherry picked from commit 3c1f319)
1 parent 02c3231 commit 32c49d0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

cmake/emu/armfvp.cmake

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ find_program(
1010
NAMES ${ARMFVP_BIN_NAME}
1111
)
1212

13+
if ((NOT "${ARMFVP}" STREQUAL "ARMFVP-NOTFOUND") AND (DEFINED ARMFVP_MIN_VERSION))
14+
execute_process(
15+
COMMAND ${ARMFVP} --version
16+
OUTPUT_VARIABLE out
17+
OUTPUT_STRIP_TRAILING_WHITESPACE
18+
)
19+
string(REPLACE "\n" "" out ${out})
20+
string(REGEX MATCH "[0-9]+\.[0-9]+\.[0-9]+" armfvp_version ${out})
21+
if(${armfvp_version} VERSION_LESS ${ARMFVP_MIN_VERSION})
22+
message(WARNING "Found FVP version is \"${armfvp_version}\", "
23+
"the minimum required by the current board is \"${ARMFVP_MIN_VERSION}\".")
24+
endif()
25+
endif()
26+
1327
if(CONFIG_ARMV8_A_NS)
1428
foreach(filetype BL1 FIP)
1529
if ((NOT DEFINED ARMFVP_${filetype}_FILE) AND (EXISTS "$ENV{ARMFVP_${filetype}_FILE}"))

0 commit comments

Comments
 (0)