new file mode 100644
@@ -0,0 +1,27 @@
+From dfdfd7f829f74b46f14470eae968c39b910fd11c Mon Sep 17 00:00:00 2001
+From: Jon Mason <jon.mason@arm.com>
+Date: Thu, 14 Dec 2023 09:01:02 -0500
+Subject: [PATCH] cmake: modify path to libmetal version file
+
+Commit ad87802d6e01e97946de20b6c2fa28aed184ed20 changed how the
+versioning is done and created a version file. Due to this change,
+the VERSION file is not being found when building because the source dir
+is pointing to tf-m. Modify to point where we want it.
+
+Upstream-Status: Inappropriate [Build workaround]
+
+Signed-off-by: Jon Mason <jon.mason@arm.com>
+---
+ cmake/options.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/options.cmake b/cmake/options.cmake
+index 4b866164c390..004126a40da1 100644
+--- a/cmake/options.cmake
++++ b/cmake/options.cmake
+@@ -1,4 +1,4 @@
+-file(READ ${CMAKE_SOURCE_DIR}/VERSION ver)
++file(READ ${CMAKE_SOURCE_DIR}/../libmetal/VERSION ver)
+
+ string(REGEX MATCH "VERSION_MAJOR = ([0-9]*)" _ ${ver})
+ set(PROJECT_VERSION_MAJOR ${CMAKE_MATCH_1})
@@ -11,18 +11,20 @@ TFM_PLATFORM_IS_FVP ?= "FALSE"
EXTRA_OECMAKE += "-DPLATFORM_IS_FVP=${TFM_PLATFORM_IS_FVP}"
EXTRA_OECMAKE += "-DCC312_LEGACY_DRIVER_API_ENABLED=ON"
-# libmetal
+# libmetal v2021.04.0
LICENSE += "& BSD-3-Clause"
LIC_FILES_CHKSUM += "file://../libmetal/LICENSE.md;md5=fe0b8a4beea8f0813b606d15a3df3d3c"
-SRC_URI += "git://github.com/OpenAMP/libmetal.git;protocol=https;branch=main;name=libmetal;destsuffix=git/libmetal"
-SRCREV_libmetal = "f252f0e007fbfb8b3a52b1d5901250ddac96baad"
+SRC_URI += "git://github.com/OpenAMP/libmetal.git;protocol=https;branch=main;name=libmetal;destsuffix=git/libmetal \
+ file://0001-cmake-modify-path-to-libmetal-version-file.patch;patchdir=../libmetal \
+ "
+SRCREV_libmetal = "59e2f084d31a60a95c99ab130227674fd365764b"
EXTRA_OECMAKE += "-DLIBMETAL_SRC_PATH=${S}/../libmetal -DLIBMETAL_BIN_PATH=${B}/libmetal-build"
-# OpenAMP
+# OpenAMP v2021.04.0
LICENSE += "& BSD-2-Clause & BSD-3-Clause"
LIC_FILES_CHKSUM += "file://../openamp/LICENSE.md;md5=a8d8cf662ef6bf9936a1e1413585ecbf"
SRC_URI += "git://github.com/OpenAMP/open-amp.git;protocol=https;branch=main;name=openamp;destsuffix=git/openamp"
-SRCREV_openamp = "347397decaa43372fc4d00f965640ebde042966d"
+SRCREV_openamp = "c3f12991991d187d47637d88e8a66076f23d0c8c"
EXTRA_OECMAKE += "-DLIBOPENAMP_SRC_PATH=${S}/../openamp -DLIBOPENAMP_BIN_PATH=${B}/libopenamp-build"
The SHAs for both libmetal and open-amp are intermediate SHAs, which are only a few patches behind the v2021.04.0 tags. Update to those tags and make the necessary changes to get them working. Signed-off-by: Jon Mason <jon.mason@arm.com> --- ...modify-path-to-libmetal-version-file.patch | 27 +++++++++++++++++++ .../trusted-firmware-m-corstone1000.inc | 12 +++++---- 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 meta-arm-bsp/recipes-bsp/trusted-firmware-m/files/0001-cmake-modify-path-to-libmetal-version-file.patch