From 694cab41ffca8eaf0d68e54e959a7af8ade63d55 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Mon, 13 May 2024 15:07:02 +0200 Subject: [PATCH] freescale-layer: imx-secure-enclave: sync with meta-imx Port the files from the scarthgap-6.6.23-2.0.0 branch of meta-imx https://onedigi.atlassian.net/browse/DEL-9011 https://onedigi.atlassian.net/browse/DEL-9081 Signed-off-by: Gabriel Valcazar --- .../imx-secure-enclave-seco_git.bb | 17 +++++++++++ .../imx-secure-enclave/imx-secure-enclave.inc | 29 ++++++++++++++++++ .../imx-secure-enclave_git.bb | 30 +++++-------------- 3 files changed, 53 insertions(+), 23 deletions(-) create mode 100644 meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave-seco_git.bb create mode 100644 meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave.inc diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave-seco_git.bb b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave-seco_git.bb new file mode 100644 index 000000000..bab785365 --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave-seco_git.bb @@ -0,0 +1,17 @@ +require imx-secure-enclave.inc + +SUMMARY += "SECO" +DESCRIPTION += "SECO" + +PLAT = "seco" + +do_install:append() { + # Remove common content that is to be installed by imx-secure-enclave + for i in common hsm nvm.h; do + rm -rf ${D}${includedir}/$i + done + rm ${D}${datadir}/se/README + rm ${D}${bindir}/nvmd_conf_setup.sh +} + +COMPATIBLE_MACHINE = "(mx95-nxp-bsp)" diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave.inc b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave.inc new file mode 100644 index 000000000..bc7ba75cc --- /dev/null +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave.inc @@ -0,0 +1,29 @@ +# Copyright 2021-2024 NXP + +SUMMARY = "NXP i.MX SECURE ENCLAVE library" +DESCRIPTION = "NXP IMX SECURE ENCLAVE library" +SECTION = "base" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=8636bd68fc00cc6a3809b7b58b45f982" + +DEPENDS = " mbedtls openssl" + +SRC_URI = "${SECURE_ENCLAVE_LIB_SRC};branch=${SRCBRANCH}" +SECURE_ENCLAVE_LIB_SRC ?= "git://github.com/NXP/imx-secure-enclave.git;protocol=https" +SRCBRANCH = "lf-6.6.23_2.0.0" +SRCREV = "7340cabd767cedd5980e3335968a577bb3909e6d" + +S = "${WORKDIR}/git" + +PLAT ?= "UNDEFINED" + +EXTRA_OEMAKE = "PLAT=${PLAT} OPENSSL_PATH=${STAGING_INCDIR} MBEDTLS_PATH=${STAGING_DIR_HOST}${datadir}/mbedtls-source" + +TARGET_CC_ARCH += "${LDFLAGS}" + +do_install() { + oe_runmake -C ${S} DESTDIR=${D} install_tests +} + +FILES:${PN} += "${datadir}/se" +RDEPENDS:${PN} += "bash" diff --git a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave_git.bb b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave_git.bb index 57f6984c6..36d933a3e 100644 --- a/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave_git.bb +++ b/meta-digi-arm/dynamic-layers/freescale-layer/recipes-bsp/imx-secure-enclave/imx-secure-enclave_git.bb @@ -1,28 +1,12 @@ -# Copyright 2021-2024 NXP +require imx-secure-enclave.inc -SUMMARY = "NXP i.MX SECURE ENCLAVE library" -DESCRIPTION = "NXP IMX SECURE ENCLAVE library" -SECTION = "base" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://EULA.txt;md5=76871788f27c28af824e2ec1ca187832" +DEPENDS:append:mx95-nxp-bsp = " imx-secure-enclave-seco" -DEPENDS = "zlib" +inherit systemd -EXTRA_OEMAKE = "PLAT=ele" +SYSTEMD_AUTO_ENABLE = "disable" +SYSTEMD_SERVICE:${PN} = "nvm_daemon.service" -SRCBRANCH = "master" -SECURE_ENCLAVE_LIB_SRC ?= "git://github.com/NXP/imx-secure-enclave.git;protocol=https" +PLAT = "ele" -SRC_URI = "${SECURE_ENCLAVE_LIB_SRC};branch=${SRCBRANCH}" -SRCREV = "e39f7b1aa54b8f654a13c6d8492e0c12eccbe6d7" - - -S = "${WORKDIR}/git" - -TARGET_CC_ARCH += "${LDFLAGS}" - -do_install () { - oe_runmake DESTDIR=${D} install_tests -} - -COMPATIBLE_MACHINE = "(mx8ulp-nxp-bsp|mx91-nxp-bsp|mx93-nxp-bsp)" +COMPATIBLE_MACHINE = "(mx8ulp-nxp-bsp|mx9-nxp-bsp)"