Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | DESCRIPTION = "Trusted Services libts library for the arm-linux enviroment. \ |
| 2 | Used for locating and accessing services from a Linux userspace client" |
| 3 | |
| 4 | TS_ENV = "arm-linux" |
| 5 | |
| 6 | require trusted-services.inc |
| 7 | |
| 8 | SRC_URI += "file://tee-udev.rules \ |
| 9 | " |
| 10 | |
| 11 | OECMAKE_SOURCEPATH="${S}/deployments/libts/${TS_ENV}" |
| 12 | |
| 13 | DEPENDS += "arm-ffa-tee arm-ffa-user" |
| 14 | RRECOMMENDS:${PN} += "arm-ffa-tee" |
| 15 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 16 | # Unix group name for dev/tee* ownership. |
| 17 | TEE_GROUP_NAME ?= "teeclnt" |
| 18 | |
| 19 | do_install:append () { |
| 20 | if ${@oe.utils.conditional('VIRTUAL-RUNTIME_dev_manager', 'busybox-mdev', 'false', 'true', d)}; then |
| 21 | install -d ${D}${nonarch_base_libdir}/udev/rules.d/ |
| 22 | install -m 755 ${WORKDIR}/tee-udev.rules ${D}${nonarch_base_libdir}/udev/rules.d/ |
| 23 | sed -i -e "s/teeclnt/${TEE_GROUP_NAME}/" ${D}${nonarch_base_libdir}/udev/rules.d/tee-udev.rules |
| 24 | fi |
| 25 | |
| 26 | # Move the dynamic libraries into the standard place. |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 27 | install -d ${D}${libdir} |
| 28 | mv ${D}${TS_INSTALL}/lib/libts* ${D}${libdir} |
| 29 | |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame^] | 30 | # Update generated cmake file to use correct paths. |
| 31 | target_cmake=$(find ${D}${TS_INSTALL}/lib/cmake/libts -type f -iname "libtsTargets-*.cmake") |
| 32 | if [ ! -z "$target_cmake" ]; then |
| 33 | sed -i -e "s#/${TS_ENV}##g" $target_cmake |
| 34 | fi |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 35 | } |
| 36 | |
| 37 | inherit ${@oe.utils.conditional('VIRTUAL-RUNTIME_dev_manager', 'busybox-mdev', '', 'useradd', d)} |
| 38 | USERADD_PACKAGES = "${PN}" |
| 39 | GROUPADD_PARAM:${PN} = "--system ${TEE_GROUP_NAME}" |
| 40 | |
| 41 | FILES:${PN} = "${libdir}/libts.so.* ${nonarch_base_libdir}/udev/rules.d/" |
| 42 | FILES:${PN}-dev = "${TS_INSTALL}/lib/cmake ${TS_INSTALL}/include ${libdir}/libts.so" |