1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-07-22 17:57:05 +00:00
Files
meta-arm/meta-arm/recipes-security/trusted-services/libts_git.bb
T
Adam Johnston 13c7463c9f arm/trusted-services: Fix 'no such file' when building libts
The libts recipe assumes generated cmake file will be suffixed with
'-noconfig'. This is only true when building with the default type
i.e. "".

Check which target cmake file has been generated before trying to
patch it. This fixes 'no such file' error when building with an
explicit type (Debug, Release, etc).

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-13 10:05:30 -05:00

43 lines
1.6 KiB
BlitzBasic

DESCRIPTION = "Trusted Services libts library for the arm-linux enviroment. \
Used for locating and accessing services from a Linux userspace client"
TS_ENV = "arm-linux"
require trusted-services.inc
SRC_URI += "file://tee-udev.rules \
"
OECMAKE_SOURCEPATH="${S}/deployments/libts/${TS_ENV}"
DEPENDS += "arm-ffa-tee arm-ffa-user"
RRECOMMENDS:${PN} += "arm-ffa-tee"
# Unix group name for dev/tee* ownership.
TEE_GROUP_NAME ?= "teeclnt"
do_install:append () {
if ${@oe.utils.conditional('VIRTUAL-RUNTIME_dev_manager', 'busybox-mdev', 'false', 'true', d)}; then
install -d ${D}${nonarch_base_libdir}/udev/rules.d/
install -m 755 ${WORKDIR}/tee-udev.rules ${D}${nonarch_base_libdir}/udev/rules.d/
sed -i -e "s/teeclnt/${TEE_GROUP_NAME}/" ${D}${nonarch_base_libdir}/udev/rules.d/tee-udev.rules
fi
# Move the dynamic libraries into the standard place.
install -d ${D}${libdir}
mv ${D}${TS_INSTALL}/lib/libts* ${D}${libdir}
# Update generated cmake file to use correct paths.
target_cmake=$(find ${D}${TS_INSTALL}/lib/cmake/libts -type f -iname "libtsTargets-*.cmake")
if [ ! -z "$target_cmake" ]; then
sed -i -e "s#/${TS_ENV}##g" $target_cmake
fi
}
inherit ${@oe.utils.conditional('VIRTUAL-RUNTIME_dev_manager', 'busybox-mdev', '', 'useradd', d)}
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM:${PN} = "--system ${TEE_GROUP_NAME}"
FILES:${PN} = "${libdir}/libts.so.* ${nonarch_base_libdir}/udev/rules.d/"
FILES:${PN}-dev = "${TS_INSTALL}/lib/cmake ${TS_INSTALL}/include ${libdir}/libts.so"