[meta-arm,4/7] arm/optee-client: rewrite recipe

Submitted by Ross Burton on Nov. 2, 2020, 3:33 p.m. | Patch ID: 178127

Details

Message ID 20201102153341.2844482-4-ross.burton@arm.com
State New
Headers show

Commit Message

Ross Burton Nov. 2, 2020, 3:33 p.m.
The license is 2-clause BSD, so specify that precisely.

No need to inherit python3native as it is not used.

Instead of using the bare Makefile build, use CMake.

Change-Id: I324f633428f10fdaabaa57b2f2561c2fdc847919
Signed-off-by: Ross Burton <ross.burton@arm.com>

---
 .../recipes-security/optee/optee-client.inc   | 35 +++----------------
 1 file changed, 5 insertions(+), 30 deletions(-)

-- 
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#1307): https://lists.yoctoproject.org/g/meta-arm/message/1307
Mute This Topic: https://lists.yoctoproject.org/mt/77983606/1003190
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-

Patch hide | download patch | download mbox

diff --git a/meta-arm/recipes-security/optee/optee-client.inc b/meta-arm/recipes-security/optee/optee-client.inc
index d82392c..26f9724 100644
--- a/meta-arm/recipes-security/optee/optee-client.inc
+++ b/meta-arm/recipes-security/optee/optee-client.inc
@@ -2,12 +2,10 @@  SUMMARY = "OP-TEE Client API"
 DESCRIPTION = "Open Portable Trusted Execution Environment - Normal World Client side of the TEE"
 HOMEPAGE = "https://www.op-tee.org/"
 
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
 
-require optee.inc
-
-inherit python3native systemd update-rc.d
+inherit systemd update-rc.d cmake
 
 SRC_URI = " \
     git://github.com/OP-TEE/optee_client.git \
@@ -16,31 +14,11 @@  SRC_URI = " \
 "
 
 S = "${WORKDIR}/git"
-B = "${WORKDIR}/build"
-
-EXTRA_OEMAKE = "O=${B}"
-
-do_compile() {
-    cd ${S}
-    oe_runmake
-}
-do_compile[cleandirs] = "${B}"
-
-do_install() {
-    cd ${S}
-    oe_runmake install
-
-    install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${sbindir}/tee-supplicant
 
-    install -D -p -m0644 ${B}/export/usr/lib/libteec.so.1.0 ${D}${libdir}/libteec.so.1.0
-    ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so
-    ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so.1
-
-    install -d ${D}${includedir}
-    install -p -m0644 ${B}/export/usr/include/*.h ${D}${includedir}
+EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON"
 
+do_install_append() {
     install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service
-
     install -D -p -m0755 ${WORKDIR}/tee-supplicant.sh ${D}${sysconfdir}/init.d/tee-supplicant
 
     sed -i -e s:@sysconfdir@:${sysconfdir}:g \
@@ -52,8 +30,5 @@  do_install() {
 SYSTEMD_SERVICE_${PN} = "tee-supplicant.service"
 
 INITSCRIPT_PACKAGES = "${PN}"
-
 INITSCRIPT_NAME_${PN} = "tee-supplicant"
 INITSCRIPT_PARAMS_${PN} = "start 10 1 2 3 4 5 . stop 90 0 6 ."
-
-

Comments

Ross Burton Nov. 4, 2020, 11:39 a.m.
On Wed, 4 Nov 2020 at 01:18, Denys Dmytriyenko <denis@denix.org> wrote:
> > -require optee.inc

>

> Was this a mistake?


No, the client library is sufficiently different that optee.inc
doesn't bring any gains.

Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#1332): https://lists.yoctoproject.org/g/meta-arm/message/1332
Mute This Topic: https://lists.yoctoproject.org/mt/77983606/1003190
Group Owner: meta-arm+owner@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [mhalstead@linuxfoundation.org]
-=-=-=-=-=-=-=-=-=-=-=-