]> code.ossystems Code Review - meta-freescale.git/commitdiff
optee-client: fix build architecture for aarch64
authorAndrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Sun, 31 May 2020 21:50:41 +0000 (21:50 +0000)
committerOtavio Salvador <otavio@ossystems.com.br>
Sun, 31 May 2020 23:09:03 +0000 (20:09 -0300)
Overridden do_compile() task relies on an old DEFAULTTUNE set to
identify if the build should target arm32 or arm64 architecture, and has
a direct comparison to the generic tune. Since aarch64 tune for some
derivatives has been switched to a more specialized types (cortexa53-crypto),
this causes the check to fail and build defaults to arm32, which is not
desired behavior.

Define OPTEE_ARCH to a proper value based on machine overrides, drop the
task override and use standard Yocto mechanisms to provide additional
parameters to make.

Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
recipes-security/optee-imx/optee-client_3.2.0.imx.bb

index 707e82fdea038e9928f4bbcac83ce7898aada84b..d3607ed4dcdab956ca1f00e02c632572713daee8 100644 (file)
@@ -13,20 +13,16 @@ SRC_URI = "${OPTEE_CLIENT_SRC};branch=${SRCBRANCH}"
 
 SRCREV = "71a9bef78fff2d5d4db8a2307d3b91e2aa671dc9"
 
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
 SRC_URI_append = " file://tee-supplicant.service"
 
 S = "${WORKDIR}/git"
 SYSTEMD_SERVICE_${PN} = "tee-supplicant.service"
 
-do_compile () {
-    if [ ${DEFAULTTUNE} = "aarch64" ]; then
-        oe_runmake -C ${S} ARCH=arm64
-    else
-        oe_runmake -C ${S} ARCH=arm
-    fi
-}
+OPTEE_ARCH ?= "arm32"
+OPTEE_ARCH_armv7a = "arm32"
+OPTEE_ARCH_aarch64 = "arm64"
+
+EXTRA_OEMAKE = "ARCH=${OPTEE_ARCH}"
 
 do_install () {
        oe_runmake install