IMPORTANT UPDATE :
I managed to solve the problem. My solution is to only add optee-examples_3.13.0.imx.bb file into the path meta-imx/meta-bsp/recipes-security/optee-imx/ .
After making modifications , here is the content of the recipe file below :
SUMMARY = "OP-TEE examples"
DESCRIPTION = "Open Portable Trusted Execution Environment - Sample Applications"
HOMEPAGE = "https://github.com/linaro-swg/optee_examples"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=cd95ab417e23b94f381dafc453d70c30"
DEPENDS = "optee-client optee-os python3-pycryptodome-native"
inherit python3native
SRC_URI = "git://github.com/linaro-swg/optee_examples.git"
SRCREV = "ff4b493e267d40bcf508acc300da296a3a2adac2"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}"
TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta_arm64"
EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \
TEEC_EXPORT=${TEEC_EXPORT} \
HOST_CROSS_COMPILE=${HOST_PREFIX} \
TA_CROSS_COMPILE=${HOST_PREFIX} \
-C ${S} OUTPUT_DIR=${B} \
"
CFLAGS += "--sysroot=${STAGING_DIR_HOST}"
do_compile() {
oe_runmake
}
do_install () {
mkdir -p ${D}${nonarch_base_libdir}/optee_armtz
mkdir -p ${D}${bindir}
install -D -p -m0755 ${B}/ca/* ${D}${bindir}
install -D -p -m0444 ${B}/ta/* ${D}${nonarch_base_libdir}/optee_armtz
}
FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/"
# Imports machine specific configs from staging to build
PACKAGE_ARCH = "${MACHINE_ARCH}"
And of course as you suggested adding these lines into local.conf but with little change.
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
MACHINE_FEATURES += "optee"
DISTRO_FEATURES += "optee"
IMAGE_INSTALL_append = " optee-test optee-os optee-client optee-examples"
Notice that I used in purpose "IMAGE_INSTALL_append" and not "IMAGE_INSTALL +=" . I passed long time to conclude that with the "IMAGE_INSTALL +=" I don't manage to see my binaries into rootfs of the image but with the append syntax that works correctly. I don't know for what reason is that. But with this way it worked perfectly. According to bitbake documentation that's equivalent but if you have any idea why is that don't hesitate to share it with us.
I hope that will solve the problem for you either if anyone had the same issue !