Skip to content

Commit

Permalink
optee: Limit sam specific changes to sam alone
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kraj committed Feb 13, 2023
1 parent b9d8591 commit a5c60b1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
9 changes: 4 additions & 5 deletions recipes-security/optee/optee-os-tadevkit_%.bbappend
Original file line number Diff line number Diff line change
@@ -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)"
26 changes: 11 additions & 15 deletions recipes-security/optee/optee-os_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
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/
install ${B}/core/${OPTEE_BINARY} ${D}/boot/${OPTEE_IMAGE}
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}
Expand All @@ -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}:"

0 comments on commit a5c60b1

Please sign in to comment.