From a5c60b10439dfbd26b8cd6da2f68a84e9da62d98 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 12 Feb 2023 09:30:02 -0800 Subject: [PATCH] optee: Limit sam specific changes to sam alone This ensures that layer can be used along with other ARM BSP layers and does not insert itself forcefully into those machines Signed-off-by: Khem Raj --- .../optee/optee-os-tadevkit_%.bbappend | 9 +++---- recipes-security/optee/optee-os_%.bbappend | 26 ++++++++----------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/recipes-security/optee/optee-os-tadevkit_%.bbappend b/recipes-security/optee/optee-os-tadevkit_%.bbappend index 9b160fd6..451e6be5 100644 --- a/recipes-security/optee/optee-os-tadevkit_%.bbappend +++ b/recipes-security/optee/optee-os-tadevkit_%.bbappend @@ -1,11 +1,10 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -SRC_URI = "git://github.com/linux4sam/optee_os-at91.git;branch=master;protocol=https" +SRC_URI:sama5d27-som1-ek-optee-sd = "git://github.com/linux4sam/optee_os-at91.git;branch=master;protocol=https" -SRCREV = "9ca99a29b95e7b07c4849d9578dd633a4aed00fb" +SRCREV:sama5d27-som1-ek-optee-sd = "9ca99a29b95e7b07c4849d9578dd633a4aed00fb" -OPTEEMACHINE = "sam" +OPTEEMACHINE:sama5d27-som1-ek-optee-sd = "sam" -DEPENDS:append = " dtc-native" +DEPENDS:append:sama5d27-som1-ek-optee-sd = " dtc-native" -COMPATIBLE_MACHINE = "(sama5d27-som1-ek-optee-sd)" diff --git a/recipes-security/optee/optee-os_%.bbappend b/recipes-security/optee/optee-os_%.bbappend index 18dc3574..1b542a8b 100644 --- a/recipes-security/optee/optee-os_%.bbappend +++ b/recipes-security/optee/optee-os_%.bbappend @@ -1,21 +1,19 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -OPTEEMACHINE = "sam" +OPTEEMACHINE:sama5d27-som1-ek-optee-sd = "sam" -DEPENDS:append = " dtc-native" +DEPENDS:append:sama5d27-som1-ek-optee-sd = " dtc-native" -SRC_URI = "git://github.com/linux4sam/optee_os-at91.git;branch=master;protocol=https" +SRC_URI:sama5d27-som1-ek-optee-sd = "git://github.com/linux4sam/optee_os-at91.git;branch=master;protocol=https" -SRCREV = "9ca99a29b95e7b07c4849d9578dd633a4aed00fb" +SRCREV:sama5d27-som1-ek-optee-sd = "9ca99a29b95e7b07c4849d9578dd633a4aed00fb" -COMPATIBLE_MACHINE = "(sama5d27-som1-ek-optee-sd)" +OPTEE_SUFFIX:sama5d27-som1-ek-optee-sd ?= "bin" +OPTEE_IMAGE:sama5d27-som1-ek-optee-sd ?= "tee-${MACHINE}-${PV}-${PR}.${OPTEE_SUFFIX}" +OPTEE_BINARY:sama5d27-som1-ek-optee-sd ?= "tee.${OPTEE_SUFFIX}" +OPTEE_SYMLINK:sama5d27-som1-ek-optee-sd ?= "tee-${MACHINE}.${OPTEE_SUFFIX}" -OPTEE_SUFFIX ?= "bin" -OPTEE_IMAGE ?= "tee-${MACHINE}-${PV}-${PR}.${OPTEE_SUFFIX}" -OPTEE_BINARY ?= "tee.${OPTEE_SUFFIX}" -OPTEE_SYMLINK ?= "tee-${MACHINE}.${OPTEE_SUFFIX}" - -do_install:append() { +do_install:append:sama5d27-som1-ek-optee-sd() { #install core in boot install -d ${D}/boot install -m 644 ${B}/core/*.bin ${B}/core/tee.elf ${D}/boot/ @@ -23,9 +21,7 @@ do_install:append() { ln -sf ${OPTEE_IMAGE} ${D}/boot/${OPTEE_BINARY} } -PACKAGE_ARCH = "${MACHINE_ARCH}" - -do_deploy:append() { +do_deploy:append:sama5d27-som1-ek-optee-sd() { install -d ${DEPLOYDIR} install -m 644 ${D}/boot/* ${DEPLOYDIR}/ install ${B}/core/${OPTEE_BINARY} ${DEPLOYDIR}/${OPTEE_IMAGE} @@ -36,7 +32,7 @@ do_deploy:append() { ln -sf ${OPTEE_IMAGE} ${OPTEE_BINARY} } -SYSROOT_DIRS += "/boot/" +SYSROOT_DIRS:append:sama5d27-som1-ek-optee-sd = " /boot/" FILES:${PN} += "/boot/" FILESPATH =. "${FILE_DIRNAME}/optee-os/${MACHINE}:"