Ver Fonte

arm/trusted-services: add libpsats recipe

TS upstream introduced a new library which carries PSA clients. This
library is to be used by linux user-space applications interfacing to
PSA providers running in the SWd.

Modify dependee to use the new library.

Signed-off-by: Gyorgy Szing <gyorgy.szing@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
Gyorgy Szing há 1 semana atrás
pai
commit
4884f787a2

+ 1 - 0
meta-arm-bsp/recipes-security/trusted-services/libpsats_%.bbappend

@@ -0,0 +1 @@
+require ts-arm-platforms.inc

+ 29 - 0
meta-arm/recipes-security/trusted-services/libpsats_git.bb

@@ -0,0 +1,29 @@
+DESCRIPTION = "Trusted Services libpsats library for the arm-linux enviroment. \
+               Libpsats carries psa client implementations to be used by linux user-space applications."
+
+TS_ENV = "arm-linux"
+
+require trusted-services.inc
+
+OECMAKE_SOURCEPATH="${S}/deployments/libpsats/${TS_ENV}"
+
+DEPENDS           += "libts"
+
+do_install:append () {
+    # Move the dynamic libraries into the standard place.
+    install -d ${D}${libdir}
+    mv ${D}${TS_INSTALL}/lib/libpsats* ${D}${libdir}
+
+    # Update generated cmake file to use correct paths.
+    target_cmake=$(find ${D}${TS_INSTALL}/lib/cmake/libpsats -type f -iname "libpsatsTargets-*.cmake")
+    if [ ! -z "$target_cmake" ]; then
+        sed -i -e "s#/${TS_ENV}##g" $target_cmake
+    fi
+
+    # Remove files installed by libts too. 
+    rm ${D}${TS_INSTALL}/include/util.h
+    rm ${D}${TS_INSTALL}/include/compiler.h
+}
+
+FILES:${PN} = "${libdir}/libpsats*.so.* ${nonarch_base_libdir}/udev/rules.d/"
+FILES:${PN}-dev = "${TS_INSTALL}/lib/cmake ${TS_INSTALL}/include ${libdir}/libpsats*.so"

+ 1 - 1
meta-arm/recipes-security/trusted-services/trusted-services.inc

@@ -54,5 +54,5 @@ EXTRA_OECMAKE += "${@get_ts_toolchain_option(d)}"
 
 # Paths to pre-built dependencies required by some TS SPs/tools
 EXTRA_OECMAKE += "-Dlibts_ROOT=${STAGING_DIR_HOST}${TS_INSTALL}/lib/cmake/libts/ \
-
+                  -Dlibpsats_ROOT=${STAGING_DIR_HOST}${TS_INSTALL}/lib/cmake/libpsats/ \
                  "

+ 2 - 2
meta-arm/recipes-security/trusted-services/ts-demo_git.bb

@@ -7,8 +7,8 @@ TS_ENV = "arm-linux"
 require trusted-services.inc
 
 DEPENDS        += "python3-jsonschema-native python3-jinja2-native"
-DEPENDS        += "libts"
-RDEPENDS:${PN} += "libts"
+DEPENDS        += "libpsats"
+RDEPENDS:${PN} += "libpsats"
 
 OECMAKE_SOURCEPATH = "${S}/deployments/ts-demo/${TS_ENV}"
 

+ 2 - 2
meta-arm/recipes-security/trusted-services/ts-psa-api-test-common_git.inc

@@ -6,8 +6,8 @@ require trusted-services.inc
 
 DEPENDS        += "python3-jsonschema-native python3-jinja2-native"
 
-DEPENDS        += "libts"
-RDEPENDS:${PN} += "libts"
+DEPENDS        += "libpsats"
+RDEPENDS:${PN} += "libpsats"
 
 SRC_URI += "git://github.com/ARM-software/psa-arch-tests.git;name=psatest;protocol=https;branch=main;destsuffix=git/psatest \
             file://0001-Pass-Yocto-build-settings-to-psa-arch-tests-native.patch;patchdir=../psatest \