diff options
Diffstat (limited to 'recipes-security')
26 files changed, 279 insertions, 161 deletions
diff --git a/recipes-security/optee-imx/optee-client-fslc-imx.inc b/recipes-security/optee-imx/optee-client-fslc-imx.inc index 1112a864d..06cc89a22 100644 --- a/recipes-security/optee-imx/optee-client-fslc-imx.inc +++ b/recipes-security/optee-imx/optee-client-fslc-imx.inc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # Copied from meta-imx/meta-imx-bsp/recipes-security/optee/optee-client-imx.inc. | 1 | # Copied from meta-imx/meta-imx-bsp/recipes-security/optee/optee-client-imx.inc. |
| 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L37 | 2 | # See:https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L39 |
| 3 | 3 | ||
| 4 | require optee-client-fslc.inc | 4 | require optee-client-fslc.inc |
| 5 | 5 | ||
| @@ -10,8 +10,6 @@ SRC_URI:remove = "git://github.com/OP-TEE/optee_client.git;branch=master;protoco | |||
| 10 | SRC_URI:prepend = "${OPTEE_CLIENT_SRC};branch=${SRCBRANCH} " | 10 | SRC_URI:prepend = "${OPTEE_CLIENT_SRC};branch=${SRCBRANCH} " |
| 11 | OPTEE_CLIENT_SRC ?= "git://github.com/nxp-imx/imx-optee-client.git;protocol=https" | 11 | OPTEE_CLIENT_SRC ?= "git://github.com/nxp-imx/imx-optee-client.git;protocol=https" |
| 12 | 12 | ||
| 13 | SRC_URI += "file://0001-tee-supplicant-Fix-non-arch-service-unit-install-pat.patch" | ||
| 14 | |||
| 15 | inherit pkgconfig | 13 | inherit pkgconfig |
| 16 | 14 | ||
| 17 | EXTRA_OECMAKE += "-DCFG_TEE_CLIENT_LOAD_PATH=${nonarch_base_libdir}" | 15 | EXTRA_OECMAKE += "-DCFG_TEE_CLIENT_LOAD_PATH=${nonarch_base_libdir}" |
diff --git a/recipes-security/optee-imx/optee-client-fslc.inc b/recipes-security/optee-imx/optee-client-fslc.inc index 70a25fe6c..61629209d 100644 --- a/recipes-security/optee-imx/optee-client-fslc.inc +++ b/recipes-security/optee-imx/optee-client-fslc.inc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # Copied from meta-arm/recipes-security/optee/optee-client.inc. | 1 | # Copied from meta-arm/recipes-security/optee/optee-client.inc. |
| 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L30 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L32 |
| 3 | 3 | ||
| 4 | SUMMARY = "OP-TEE Client API" | 4 | SUMMARY = "OP-TEE Client API" |
| 5 | DESCRIPTION = "Open Portable Trusted Execution Environment - Normal World Client side of the TEE" | 5 | DESCRIPTION = "Open Portable Trusted Execution Environment - Normal World Client side of the TEE" |
| @@ -10,14 +10,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" | |||
| 10 | 10 | ||
| 11 | inherit systemd update-rc.d cmake useradd | 11 | inherit systemd update-rc.d cmake useradd |
| 12 | 12 | ||
| 13 | SRC_URI = " \ | 13 | SRC_URI = "\ |
| 14 | git://github.com/OP-TEE/optee_client.git;branch=master;protocol=https \ | 14 | git://github.com/OP-TEE/optee_client.git;branch=master;protocol=https \ |
| 15 | file://tee-supplicant.sh \ | 15 | file://tee-supplicant.sh \ |
| 16 | " | 16 | " |
| 17 | 17 | ||
| 18 | UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" | 18 | UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" |
| 19 | 19 | ||
| 20 | EXTRA_OECMAKE = " \ | 20 | EXTRA_OECMAKE = "\ |
| 21 | -DBUILD_SHARED_LIBS=ON \ | 21 | -DBUILD_SHARED_LIBS=ON \ |
| 22 | -DCFG_USE_PKGCONFIG=ON \ | 22 | -DCFG_USE_PKGCONFIG=ON \ |
| 23 | " | 23 | " |
| @@ -25,9 +25,9 @@ EXTRA_OECMAKE = " \ | |||
| 25 | # libts uses /dev/tee devices too. Add a common variable to allow configuring the same group. | 25 | # libts uses /dev/tee devices too. Add a common variable to allow configuring the same group. |
| 26 | TEE_GROUP_NAME ?= "tee" | 26 | TEE_GROUP_NAME ?= "tee" |
| 27 | 27 | ||
| 28 | EXTRA_OECMAKE += " -DCFG_ENABLE_SYSTEMD=On -DSYSTEMD_UNIT_DIR=${systemd_system_unitdir}/" | 28 | EXTRA_OECMAKE += "-DCFG_ENABLE_SYSTEMD=On -DSYSTEMD_UNIT_DIR=${systemd_system_unitdir}/" |
| 29 | EXTRA_OECMAKE += " -DCFG_ENABLE_UDEV=On -DUDEV_UDEV_DIR=${nonarch_base_libdir}/udev/rules.d/" | 29 | EXTRA_OECMAKE += "-DCFG_ENABLE_UDEV=On -DUDEV_UDEV_DIR=${nonarch_base_libdir}/udev/rules.d/" |
| 30 | EXTRA_OECMAKE += " -DCFG_TEE_GROUP=${TEE_GROUP_NAME} -DCFG_TEEPRIV_GROUP=teepriv" | 30 | EXTRA_OECMAKE += "-DCFG_TEE_GROUP=${TEE_GROUP_NAME} -DCFG_TEEPRIV_GROUP=teepriv" |
| 31 | 31 | ||
| 32 | EXTRA_OECMAKE:append:toolchain-clang = " -DCFG_WERROR=0" | 32 | EXTRA_OECMAKE:append:toolchain-clang = " -DCFG_WERROR=0" |
| 33 | 33 | ||
diff --git a/recipes-security/optee-imx/optee-client_4.6.0.imx.bb b/recipes-security/optee-imx/optee-client_4.6.0.imx.bb deleted file mode 100644 index b5a185da1..000000000 --- a/recipes-security/optee-imx/optee-client_4.6.0.imx.bb +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | require optee-client-fslc-imx.inc | ||
| 2 | |||
| 3 | SRCBRANCH = "lf-6.12.20_2.0.0" | ||
| 4 | SRCREV = "02e7f9213b0d7db9c35ebf1e41e733fc9c5a3f75" | ||
diff --git a/recipes-security/optee-imx/optee-client_4.8.0.imx.bb b/recipes-security/optee-imx/optee-client_4.8.0.imx.bb new file mode 100644 index 000000000..cb3235a9a --- /dev/null +++ b/recipes-security/optee-imx/optee-client_4.8.0.imx.bb | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | require optee-client-fslc-imx.inc | ||
| 2 | |||
| 3 | SRCBRANCH = "lf-6.18.2_1.0.0" | ||
| 4 | SRCREV = "ad79099ca6b642f2bb69739f020ea50698ea0744" | ||
diff --git a/recipes-security/optee-imx/optee-fslc.inc b/recipes-security/optee-imx/optee-fslc.inc index 599dda522..906001d24 100644 --- a/recipes-security/optee-imx/optee-fslc.inc +++ b/recipes-security/optee-imx/optee-fslc.inc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # Copied from meta-arm/recipes-security/optee/optee.inc. | 1 | # Copied from meta-arm/recipes-security/optee/optee.inc. |
| 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L30 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L32 |
| 3 | 3 | ||
| 4 | UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" | 4 | UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" |
| 5 | 5 | ||
| @@ -19,19 +19,16 @@ OPTEE_ARCH:arm = "arm32" | |||
| 19 | OPTEE_ARCH:aarch64 = "arm64" | 19 | OPTEE_ARCH:aarch64 = "arm64" |
| 20 | OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}" | 20 | OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}" |
| 21 | 21 | ||
| 22 | OPTEE_TOOLCHAIN = "${@d.getVar('TOOLCHAIN') or 'gcc'}" | ||
| 23 | OPTEE_COMPILER = "${@bb.utils.contains("BBFILE_COLLECTIONS", "clang-layer", "${OPTEE_TOOLCHAIN}", "gcc", d)}" | ||
| 24 | |||
| 25 | # Set here but not passed to EXTRA_OEMAKE by default as that breaks | 22 | # Set here but not passed to EXTRA_OEMAKE by default as that breaks |
| 26 | # the optee-os build | 23 | # the optee-os build |
| 27 | TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta" | 24 | TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta" |
| 28 | 25 | ||
| 26 | # Assume that our TOOLCHAIN matches OP-TEE's COMPILER | ||
| 29 | EXTRA_OEMAKE += "V=1 \ | 27 | EXTRA_OEMAKE += "V=1 \ |
| 30 | LIBGCC_LOCATE_CFLAGS='${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \ | 28 | COMPILER=${TOOLCHAIN} \ |
| 31 | COMPILER=${OPTEE_COMPILER} \ | ||
| 32 | OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${prefix} \ | 29 | OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${prefix} \ |
| 33 | TEEC_EXPORT=${STAGING_DIR_HOST}${prefix} \ | 30 | TEEC_EXPORT=${STAGING_DIR_HOST}${prefix} \ |
| 34 | " | 31 | " |
| 35 | # python3-cryptography needs the legacy provider, so set OPENSSL_MODULES to the | 32 | # python3-cryptography needs the legacy provider, so set OPENSSL_MODULES to the |
| 36 | # right path until this is relocated automatically. | 33 | # right path until this is relocated automatically. |
| 37 | export OPENSSL_MODULES = "${STAGING_LIBDIR_NATIVE}/ossl-modules" | 34 | export OPENSSL_MODULES = "${STAGING_LIBDIR_NATIVE}/ossl-modules" |
diff --git a/recipes-security/optee-imx/optee-os-common-fslc-imx.inc b/recipes-security/optee-imx/optee-os-common-fslc-imx.inc index ffd217099..ed11d0ca6 100644 --- a/recipes-security/optee-imx/optee-os-common-fslc-imx.inc +++ b/recipes-security/optee-imx/optee-os-common-fslc-imx.inc | |||
| @@ -1,14 +1,13 @@ | |||
| 1 | # Copied from meta-imx/meta-imx-bsp/recipes-security/optee/optee-os-common-imx.inc. | 1 | # Copied from meta-imx/meta-imx-bsp/recipes-security/optee/optee-os-common-imx.inc. |
| 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L37 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L39 |
| 3 | require optee-os-fslc.inc | 3 | require optee-os-fslc.inc |
| 4 | 4 | ||
| 5 | DEPENDS:append:arm = "u-boot-mkimage-native" | 5 | DEPENDS:append:arm = " u-boot-mkimage-native" |
| 6 | 6 | ||
| 7 | FILESEXTRAPATHS:prepend := "${THISDIR}/optee-os:" | 7 | FILESEXTRAPATHS:prepend := "${THISDIR}/optee-os:" |
| 8 | 8 | ||
| 9 | SRC_URI:remove = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https" | 9 | SRC_URI:remove = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https" |
| 10 | SRC_URI:prepend = "${OPTEE_OS_SRC};branch=${SRCBRANCH} " | 10 | SRC_URI:prepend = "${OPTEE_OS_SRC};branch=${SRCBRANCH} " |
| 11 | SRC_URI:append = " file://0007-allow-setting-sysroot-for-clang.patch" | ||
| 12 | SRC_URI:remove = "file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \ | 11 | SRC_URI:remove = "file://0001-allow-setting-sysroot-for-libgcc-lookup.patch \ |
| 13 | file://0002-optee-enable-clang-support.patch \ | 12 | file://0002-optee-enable-clang-support.patch \ |
| 14 | file://0003-core-link-add-no-warn-rwx-segments.patch" | 13 | file://0003-core-link-add-no-warn-rwx-segments.patch" |
| @@ -19,26 +18,26 @@ inherit features_check | |||
| 19 | 18 | ||
| 20 | REQUIRED_MACHINE_FEATURES = "optee" | 19 | REQUIRED_MACHINE_FEATURES = "optee" |
| 21 | 20 | ||
| 22 | OPTEEMACHINE = "imx-${@d.getVar('MACHINE')[1:]}" | 21 | OPTEEMACHINE = "imx-${@d.getVar('MACHINE')[1:]}" |
| 23 | OPTEEMACHINE:imx6qpdlsolox = "imx-mx6qsabresd" | 22 | OPTEEMACHINE:imx6qpdlsolox = "imx-mx6qsabresd" |
| 24 | OPTEEMACHINE:mx6ul-nxp-bsp = "imx-mx6ulevk" | 23 | OPTEEMACHINE:mx6ul-nxp-bsp = "imx-mx6ulevk" |
| 25 | OPTEEMACHINE:mx6ull-nxp-bsp = "imx-mx6ullevk" | 24 | OPTEEMACHINE:mx6ull-nxp-bsp = "imx-mx6ullevk" |
| 26 | OPTEEMACHINE:mx6ulz-nxp-bsp = "imx-mx6ulzevk" | 25 | OPTEEMACHINE:mx6ulz-nxp-bsp = "imx-mx6ulzevk" |
| 27 | OPTEEMACHINE:mx8mq-nxp-bsp = "imx-mx8mqevk" | 26 | OPTEEMACHINE:mx8mq-nxp-bsp = "imx-mx8mqevk" |
| 28 | OPTEEMACHINE:mx8mm-nxp-bsp = "imx-mx8mmevk" | 27 | OPTEEMACHINE:mx8mm-nxp-bsp = "imx-mx8mmevk" |
| 29 | OPTEEMACHINE:mx8mn-nxp-bsp = "imx-mx8mnevk" | 28 | OPTEEMACHINE:mx8mn-nxp-bsp = "imx-mx8mnevk" |
| 30 | OPTEEMACHINE:mx8mp-nxp-bsp = "imx-mx8mpevk" | 29 | OPTEEMACHINE:mx8mp-nxp-bsp = "imx-mx8mpevk" |
| 31 | OPTEEMACHINE:mx8mpul-nxp-bsp = "imx-mx8mpevk" | 30 | OPTEEMACHINE:mx8mpul-nxp-bsp = "imx-mx8mpevk" |
| 32 | OPTEEMACHINE:mx8qm-nxp-bsp = "imx-mx8qmmek" | 31 | OPTEEMACHINE:mx8qm-nxp-bsp = "imx-mx8qmmek" |
| 33 | OPTEEMACHINE:mx8qxp-nxp-bsp = "imx-mx8qxpmek" | 32 | OPTEEMACHINE:mx8qxp-nxp-bsp = "imx-mx8qxpmek" |
| 34 | OPTEEMACHINE:mx8dx-nxp-bsp = "imx-mx8dxmek" | 33 | OPTEEMACHINE:mx8dx-nxp-bsp = "imx-mx8dxmek" |
| 35 | OPTEEMACHINE:mx8dxl-nxp-bsp = "imx-mx8dxlevk" | 34 | OPTEEMACHINE:mx8dxl-nxp-bsp = "imx-mx8dxlevk" |
| 36 | OPTEEMACHINE:mx8mnul-nxp-bsp = "imx-mx8mnevk" | 35 | OPTEEMACHINE:mx8mnul-nxp-bsp = "imx-mx8mnevk" |
| 37 | OPTEEMACHINE:mx8ulp-nxp-bsp = "imx-mx8ulpevk" | 36 | OPTEEMACHINE:mx8ulp-nxp-bsp = "imx-mx8ulpevk" |
| 38 | OPTEEMACHINE:mx91-nxp-bsp = "imx-mx91evk" | 37 | OPTEEMACHINE:mx91-nxp-bsp = "imx-mx91evk" |
| 39 | OPTEEMACHINE:mx93-nxp-bsp = "imx-mx93evk" | 38 | OPTEEMACHINE:mx93-nxp-bsp = "imx-mx93evk" |
| 40 | OPTEEMACHINE:mx943-nxp-bsp = "imx-mx943evk" | 39 | OPTEEMACHINE:mx943-nxp-bsp = "imx-mx943evk" |
| 41 | OPTEEMACHINE:mx95-nxp-bsp = "imx-mx95evk" | 40 | OPTEEMACHINE:mx95-nxp-bsp = "imx-mx95evk" |
| 42 | 41 | ||
| 43 | # Strip the leading imx- | 42 | # Strip the leading imx- |
| 44 | PLATFORM_FLAVOR = "${@d.getVar('OPTEEMACHINE')[4:]}" | 43 | PLATFORM_FLAVOR = "${@d.getVar('OPTEEMACHINE')[4:]}" |
diff --git a/recipes-security/optee-imx/optee-os-fslc-imx.inc b/recipes-security/optee-imx/optee-os-fslc-imx.inc index f46f666ee..ecd88b41d 100644 --- a/recipes-security/optee-imx/optee-os-fslc-imx.inc +++ b/recipes-security/optee-imx/optee-os-fslc-imx.inc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # Copied from meta-imx/meta-imx-bsp/recipes-security/optee/optee-os-imx.inc. | 1 | # Copied from meta-imx/meta-imx-bsp/recipes-security/optee/optee-os-imx.inc. |
| 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L37 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L39 |
| 3 | 3 | ||
| 4 | require optee-os-common-fslc-imx.inc | 4 | require optee-os-common-fslc-imx.inc |
| 5 | 5 | ||
diff --git a/recipes-security/optee-imx/optee-os-fslc.inc b/recipes-security/optee-imx/optee-os-fslc.inc index 4df1617d1..b36810c60 100644 --- a/recipes-security/optee-imx/optee-os-fslc.inc +++ b/recipes-security/optee-imx/optee-os-fslc.inc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # Copied from meta-arm/recipes-security/optee/optee-os.inc. | 1 | # Copied from meta-arm/recipes-security/optee/optee-os.inc. |
| 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L30 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L32 |
| 3 | 3 | ||
| 4 | SUMMARY = "OP-TEE Trusted OS" | 4 | SUMMARY = "OP-TEE Trusted OS" |
| 5 | DESCRIPTION = "Open Portable Trusted Execution Environment - Trusted side of the TEE" | 5 | DESCRIPTION = "Open Portable Trusted Execution Environment - Trusted side of the TEE" |
| @@ -13,15 +13,15 @@ require optee-fslc.inc | |||
| 13 | 13 | ||
| 14 | CVE_PRODUCT = "linaro:op-tee op-tee:op-tee_os" | 14 | CVE_PRODUCT = "linaro:op-tee op-tee:op-tee_os" |
| 15 | 15 | ||
| 16 | DEPENDS = "python3-pyelftools-native python3-cryptography-native" | 16 | DEPENDS = "python3-cryptography-native python3-pyelftools-native" |
| 17 | 17 | ||
| 18 | DEPENDS:append:toolchain-clang = " compiler-rt" | 18 | DEPENDS:append:toolchain-clang = " lld-native compiler-rt" |
| 19 | 19 | ||
| 20 | SRC_URI = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https" | 20 | SRC_URI = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https" |
| 21 | 21 | ||
| 22 | B = "${WORKDIR}/build" | 22 | B = "${WORKDIR}/build" |
| 23 | 23 | ||
| 24 | EXTRA_OEMAKE += " \ | 24 | EXTRA_OEMAKE += "\ |
| 25 | PLATFORM=${OPTEEMACHINE} \ | 25 | PLATFORM=${OPTEEMACHINE} \ |
| 26 | CFG_${OPTEE_CORE}_core=y \ | 26 | CFG_${OPTEE_CORE}_core=y \ |
| 27 | CROSS_COMPILE_core=${HOST_PREFIX} \ | 27 | CROSS_COMPILE_core=${HOST_PREFIX} \ |
| @@ -30,18 +30,17 @@ EXTRA_OEMAKE += " \ | |||
| 30 | ta-targets=ta_${OPTEE_ARCH} \ | 30 | ta-targets=ta_${OPTEE_ARCH} \ |
| 31 | O=${B} \ | 31 | O=${B} \ |
| 32 | " | 32 | " |
| 33 | EXTRA_OEMAKE += " HOST_PREFIX=${HOST_PREFIX}" | 33 | EXTRA_OEMAKE += "HOST_PREFIX=${HOST_PREFIX}" |
| 34 | EXTRA_OEMAKE += " CROSS_COMPILE64=${HOST_PREFIX}" | 34 | EXTRA_OEMAKE += "CROSS_COMPILE64=${HOST_PREFIX}" |
| 35 | |||
| 36 | # Enable BTI in optee | ||
| 37 | EXTRA_OEMAKE += "${@bb.utils.contains('MACHINE_FEATURES', 'arm-branch-protection', ' CFG_TA_BTI=1 CFG_CORE_PAUTH=y CFG_TA_PAUTH=y', '', d)}" | ||
| 35 | 38 | ||
| 36 | LDFLAGS[unexport] = "1" | 39 | LDFLAGS[unexport] = "1" |
| 37 | CPPFLAGS[unexport] = "1" | 40 | CPPFLAGS[unexport] = "1" |
| 38 | AS[unexport] = "1" | 41 | AS[unexport] = "1" |
| 39 | LD[unexport] = "1" | 42 | LD[unexport] = "1" |
| 40 | 43 | ||
| 41 | do_compile:prepend() { | ||
| 42 | PLAT_LIBGCC_PATH=$(${CC} -print-libgcc-file-name) | ||
| 43 | } | ||
| 44 | |||
| 45 | do_compile() { | 44 | do_compile() { |
| 46 | oe_runmake -C ${S} all | 45 | oe_runmake -C ${S} all |
| 47 | } | 46 | } |
| @@ -75,7 +74,6 @@ PACKAGES += "${PN}-ta" | |||
| 75 | FILES:${PN} = "${nonarch_base_libdir}/firmware/" | 74 | FILES:${PN} = "${nonarch_base_libdir}/firmware/" |
| 76 | FILES:${PN}-ta = "${nonarch_base_libdir}/optee_armtz/*" | 75 | FILES:${PN}-ta = "${nonarch_base_libdir}/optee_armtz/*" |
| 77 | 76 | ||
| 78 | |||
| 79 | # note: "textrel" is not triggered on all archs | 77 | # note: "textrel" is not triggered on all archs |
| 80 | INSANE_SKIP:${PN} = "textrel" | 78 | INSANE_SKIP:${PN} = "textrel" |
| 81 | INSANE_SKIP:${PN}-dev = "staticdev" | 79 | INSANE_SKIP:${PN}-dev = "staticdev" |
diff --git a/recipes-security/optee-imx/optee-os-tadevkit-fslc-imx.inc b/recipes-security/optee-imx/optee-os-tadevkit-fslc-imx.inc index 0b02c6908..0fac7771f 100644 --- a/recipes-security/optee-imx/optee-os-tadevkit-fslc-imx.inc +++ b/recipes-security/optee-imx/optee-os-tadevkit-fslc-imx.inc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # Copied from meta-imx/meta-imx-bsp/recipes-security/optee/optee-os-tadevkit-imx.inc. | 1 | # Copied from meta-imx/meta-imx-bsp/recipes-security/optee/optee-os-tadevkit-imx.inc. |
| 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L37 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L39 |
| 3 | 3 | ||
| 4 | require optee-os-common-fslc-imx.inc | 4 | require optee-os-common-fslc-imx.inc |
| 5 | 5 | ||
| @@ -18,7 +18,10 @@ do_install() { | |||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | do_deploy() { | 20 | do_deploy() { |
| 21 | echo "Do not inherit do_deploy from optee-os." | 21 | echo "Do not inherit do_deploy from optee-os." |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | FILES:${PN} = "${includedir}/optee/" | 24 | FILES:${PN} = "${includedir}/optee/" |
| 25 | |||
| 26 | # Build paths are currently embedded | ||
| 27 | INSANE_SKIP:${PN}-dev += "buildpaths" | ||
diff --git a/recipes-security/optee-imx/optee-os-tadevkit_4.6.0.imx.bb b/recipes-security/optee-imx/optee-os-tadevkit_4.6.0.imx.bb deleted file mode 100644 index 92bdf00e7..000000000 --- a/recipes-security/optee-imx/optee-os-tadevkit_4.6.0.imx.bb +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | require optee-os-tadevkit-fslc-imx.inc | ||
| 2 | |||
| 3 | SRCBRANCH = "lf-6.12.20_2.0.0" | ||
| 4 | SRCREV = "87964807d80baf1dcfd89cafc66de34a1cf16bf3" | ||
diff --git a/recipes-security/optee-imx/optee-os-tadevkit_4.8.0.imx.bb b/recipes-security/optee-imx/optee-os-tadevkit_4.8.0.imx.bb new file mode 100644 index 000000000..d62d7d647 --- /dev/null +++ b/recipes-security/optee-imx/optee-os-tadevkit_4.8.0.imx.bb | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | require optee-os-tadevkit-fslc-imx.inc | ||
| 2 | |||
| 3 | SRCBRANCH = "lf-6.18.2_1.0.0" | ||
| 4 | SRCREV = "e7ed997213779e3d1b7417461c5b4847d3230db9" | ||
diff --git a/recipes-security/optee-imx/optee-os_4.6.0.imx.bb b/recipes-security/optee-imx/optee-os_4.6.0.imx.bb deleted file mode 100644 index ed2557bcb..000000000 --- a/recipes-security/optee-imx/optee-os_4.6.0.imx.bb +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | # Copyright 2017-2024 NXP | ||
| 2 | |||
| 3 | require optee-os-fslc-imx.inc | ||
| 4 | |||
| 5 | SRCBRANCH = "lf-6.12.20_2.0.0" | ||
| 6 | SRCREV = "87964807d80baf1dcfd89cafc66de34a1cf16bf3" | ||
diff --git a/recipes-security/optee-imx/optee-os_4.8.0.imx.bb b/recipes-security/optee-imx/optee-os_4.8.0.imx.bb new file mode 100644 index 000000000..b73b4c757 --- /dev/null +++ b/recipes-security/optee-imx/optee-os_4.8.0.imx.bb | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | # Copyright 2017-2024,2026 NXP | ||
| 2 | |||
| 3 | require optee-os-fslc-imx.inc | ||
| 4 | |||
| 5 | SRCBRANCH = "lf-6.18.2_1.0.0" | ||
| 6 | SRCREV = "e7ed997213779e3d1b7417461c5b4847d3230db9" | ||
diff --git a/recipes-security/optee-imx/optee-test-fslc-imx.inc b/recipes-security/optee-imx/optee-test-fslc-imx.inc index b4bb6031b..23e22bc9f 100644 --- a/recipes-security/optee-imx/optee-test-fslc-imx.inc +++ b/recipes-security/optee-imx/optee-test-fslc-imx.inc | |||
| @@ -1,9 +1,13 @@ | |||
| 1 | # Copied from meta-imx/meta-imx-bsp/recipes-security/optee/optee-test-imx.inc. | 1 | # Copied from meta-imx/meta-imx-bsp/recipes-security/optee/optee-test-imx.inc. |
| 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L37 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L39 |
| 3 | require optee-test-fslc.inc | 3 | require optee-test-fslc.inc |
| 4 | 4 | ||
| 5 | DEPENDS += "openssl" | 5 | DEPENDS += "openssl" |
| 6 | 6 | ||
| 7 | inherit features_check | ||
| 8 | |||
| 9 | REQUIRED_MACHINE_FEATURES = "optee" | ||
| 10 | |||
| 7 | FILESEXTRAPATHS:prepend := "${THISDIR}/optee-test:" | 11 | FILESEXTRAPATHS:prepend := "${THISDIR}/optee-test:" |
| 8 | 12 | ||
| 9 | SRC_URI:remove = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https" | 13 | SRC_URI:remove = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https" |
| @@ -13,6 +17,6 @@ OPTEE_TEST_SRC ?= "git://github.com/nxp-imx/imx-optee-test.git;protocol=https" | |||
| 13 | 17 | ||
| 14 | EXTRA_OEMAKE:append:libc-musl = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}" | 18 | EXTRA_OEMAKE:append:libc-musl = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}" |
| 15 | CFLAGS:append:libc-musl = " -Wno-error=deprecated-declarations" | 19 | CFLAGS:append:libc-musl = " -Wno-error=deprecated-declarations" |
| 16 | CFLAGS += " -Wno-error=unterminated-string-initialization" | 20 | CFLAGS += "-Wno-error=unterminated-string-initialization" |
| 17 | 21 | ||
| 18 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | 22 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" |
diff --git a/recipes-security/optee-imx/optee-test-fslc.inc b/recipes-security/optee-imx/optee-test-fslc.inc index 46d57ac41..66683b613 100644 --- a/recipes-security/optee-imx/optee-test-fslc.inc +++ b/recipes-security/optee-imx/optee-test-fslc.inc | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | # Copied from meta-arm/recipes-security/optee/optee-test.inc. | 1 | # Copied from meta-arm/recipes-security/optee/optee-test.inc. |
| 2 | # See:https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L30 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-whinlatter/imx-6.18.2-1.0.0.xml#L32 |
| 3 | 3 | ||
| 4 | SUMMARY = "OP-TEE sanity testsuite" | 4 | SUMMARY = "OP-TEE sanity testsuite" |
| 5 | DESCRIPTION = "Open Portable Trusted Execution Environment - Test suite" | 5 | DESCRIPTION = "Open Portable Trusted Execution Environment - Test suite" |
| @@ -11,11 +11,12 @@ inherit python3native ptest | |||
| 11 | inherit deploy | 11 | inherit deploy |
| 12 | require optee-fslc.inc | 12 | require optee-fslc.inc |
| 13 | 13 | ||
| 14 | DEPENDS = "optee-client optee-os-tadevkit python3-cryptography-native openssl" | 14 | DEPENDS = "openssl optee-client optee-os-tadevkit python3-cryptography-native" |
| 15 | DEPENDS:append:toolchain-clang = " lld-native" | ||
| 15 | 16 | ||
| 16 | SRC_URI = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https \ | 17 | SRC_URI = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https \ |
| 17 | file://run-ptest \ | 18 | file://run-ptest \ |
| 18 | " | 19 | " |
| 19 | 20 | ||
| 20 | B = "${WORKDIR}/build" | 21 | B = "${WORKDIR}/build" |
| 21 | 22 | ||
| @@ -24,7 +25,7 @@ EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ | |||
| 24 | CROSS_COMPILE_HOST=${HOST_PREFIX} \ | 25 | CROSS_COMPILE_HOST=${HOST_PREFIX} \ |
| 25 | CROSS_COMPILE_TA=${HOST_PREFIX} \ | 26 | CROSS_COMPILE_TA=${HOST_PREFIX} \ |
| 26 | O=${B} \ | 27 | O=${B} \ |
| 27 | " | 28 | " |
| 28 | 29 | ||
| 29 | CFLAGS += "-Wno-error=deprecated-declarations" | 30 | CFLAGS += "-Wno-error=deprecated-declarations" |
| 30 | 31 | ||
| @@ -42,9 +43,9 @@ do_install () { | |||
| 42 | 43 | ||
| 43 | # install path should match the value set in optee-client/tee-supplicant | 44 | # install path should match the value set in optee-client/tee-supplicant |
| 44 | # default TEEC_LOAD_PATH is /lib | 45 | # default TEEC_LOAD_PATH is /lib |
| 45 | mkdir -p ${D}${nonarch_base_libdir}/optee_armtz/ | 46 | install -d ${D}${nonarch_base_libdir}/optee_armtz/ |
| 46 | install -D -p -m0444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ | 47 | install -D -p -m0444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/ |
| 47 | mkdir -p ${D}${libdir}/tee-supplicant/plugins | 48 | install -d ${D}${libdir}/tee-supplicant/plugins |
| 48 | install -D -p -m0444 ${B}/supp_plugin/*.plugin ${D}${libdir}/tee-supplicant/plugins/ | 49 | install -D -p -m0444 ${B}/supp_plugin/*.plugin ${D}${libdir}/tee-supplicant/plugins/ |
| 49 | } | 50 | } |
| 50 | 51 | ||
| @@ -57,7 +58,7 @@ addtask deploy before do_build after do_install | |||
| 57 | 58 | ||
| 58 | FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ \ | 59 | FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/ \ |
| 59 | ${libdir}/tee-supplicant/plugins/ \ | 60 | ${libdir}/tee-supplicant/plugins/ \ |
| 60 | " | 61 | " |
| 61 | 62 | ||
| 62 | # Imports machine specific configs from staging to build | 63 | # Imports machine specific configs from staging to build |
| 63 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 64 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
diff --git a/recipes-security/optee-imx/optee-test_4.6.0.imx.bb b/recipes-security/optee-imx/optee-test_4.8.0.imx.bb index 78e933486..42d525855 100644 --- a/recipes-security/optee-imx/optee-test_4.6.0.imx.bb +++ b/recipes-security/optee-imx/optee-test_4.8.0.imx.bb | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # Copyright 2017-2024 NXP | 1 | # Copyright 2017-2024,2026 NXP |
| 2 | 2 | ||
| 3 | require optee-test-fslc-imx.inc | 3 | require optee-test-fslc-imx.inc |
| 4 | 4 | ||
| @@ -8,6 +8,5 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a8fa504109e4cd7ea575bc49ea4be560 \ | |||
| 8 | file://LICENSE-BSD;md5=dca16d6efa93b55d0fd662ae5cd6feeb \ | 8 | file://LICENSE-BSD;md5=dca16d6efa93b55d0fd662ae5cd6feeb \ |
| 9 | file://LICENSE-GPL;md5=10e86b5d2a6cb0e2b9dcfdd26a9ac58d" | 9 | file://LICENSE-GPL;md5=10e86b5d2a6cb0e2b9dcfdd26a9ac58d" |
| 10 | 10 | ||
| 11 | 11 | SRCBRANCH = "lf-6.18.2_1.0.0" | |
| 12 | SRCBRANCH = "lf-6.12.20_2.0.0" | 12 | SRCREV = "3383a744a5997fdb3457b3cbe95aea3ce27879b3" |
| 13 | SRCREV = "010f088f05b5ebf392c6e235d6e53d391755722f" | ||
diff --git a/recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.8.0.bb b/recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.8.0.bb index 491817ef1..93a049001 100644 --- a/recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.8.0.bb +++ b/recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.8.0.bb | |||
| @@ -18,7 +18,7 @@ do_install() { | |||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | do_deploy() { | 20 | do_deploy() { |
| 21 | echo "Do not inherit do_deploy from optee-os." | 21 | echo "Do not inherit do_deploy from optee-os." |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | FILES:${PN} = "${includedir}/optee/" | 24 | FILES:${PN} = "${includedir}/optee/" |
diff --git a/recipes-security/optee-qoriq/optee-os-qoriq_4.8.0.bb b/recipes-security/optee-qoriq/optee-os-qoriq_4.8.0.bb index 3241ab8c4..64c666286 100644 --- a/recipes-security/optee-qoriq/optee-os-qoriq_4.8.0.bb +++ b/recipes-security/optee-qoriq/optee-os-qoriq_4.8.0.bb | |||
| @@ -4,18 +4,18 @@ OPTEE_OS_BRANCH = "lf-6.12.49_2.2.0" | |||
| 4 | SRCREV = "b3883a773a9d15ec6439f9229e48f540c37e0d00" | 4 | SRCREV = "b3883a773a9d15ec6439f9229e48f540c37e0d00" |
| 5 | 5 | ||
| 6 | do_install:append () { | 6 | do_install:append () { |
| 7 | install -d ${D}${nonarch_base_libdir}/firmware/ | 7 | install -d ${D}${nonarch_base_libdir}/firmware/ |
| 8 | install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ | 8 | install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ |
| 9 | install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin | 9 | install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin |
| 10 | 10 | ||
| 11 | # Install embedded TAs | 11 | # Install embedded TAs |
| 12 | install -d ${D}${base_libdir}/optee_armtz/ | 12 | install -d ${D}${base_libdir}/optee_armtz/ |
| 13 | install -m 444 ${B}/ta/*/*.ta ${D}${base_libdir}/optee_armtz/ | 13 | install -m 444 ${B}/ta/*/*.ta ${D}${base_libdir}/optee_armtz/ |
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | do_deploy:append () { | 16 | do_deploy:append () { |
| 17 | install -d ${DEPLOYDIR}/optee | 17 | install -d ${DEPLOYDIR}/optee |
| 18 | install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/ | 18 | install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/ |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | FILES:${PN} = "${nonarch_base_libdir}/optee_armtz/ ${nonarch_base_libdir}/firmware/" | 21 | FILES:${PN} = "${nonarch_base_libdir}/optee_armtz/ ${nonarch_base_libdir}/firmware/" |
diff --git a/recipes-security/optee-qoriq/optee-os.nxp.inc b/recipes-security/optee-qoriq/optee-os.nxp.inc index 1a837d54a..270d23c3b 100644 --- a/recipes-security/optee-qoriq/optee-os.nxp.inc +++ b/recipes-security/optee-qoriq/optee-os.nxp.inc | |||
| @@ -17,9 +17,9 @@ REQUIRED_MACHINE_FEATURES = "optee" | |||
| 17 | inherit features_check | 17 | inherit features_check |
| 18 | 18 | ||
| 19 | OPTEEMACHINE = "ls-${MACHINE}" | 19 | OPTEEMACHINE = "ls-${MACHINE}" |
| 20 | OPTEEMACHINE:ls1088ardb-pb = "ls-ls1088ardb" | 20 | OPTEEMACHINE:ls1088ardb-pb = "ls-ls1088ardb" |
| 21 | OPTEEMACHINE:ls1046afrwy = "ls-ls1046ardb" | 21 | OPTEEMACHINE:ls1046afrwy = "ls-ls1046ardb" |
| 22 | OPTEEMACHINE:lx2162aqds = "ls-lx2160aqds" | 22 | OPTEEMACHINE:lx2162aqds = "ls-lx2160aqds" |
| 23 | OPTEEMACHINE:lx2160ardb-rev2 = "ls-lx2160ardb" | 23 | OPTEEMACHINE:lx2160ardb-rev2 = "ls-lx2160ardb" |
| 24 | 24 | ||
| 25 | EXTRA_OEMAKE:append = " \ | 25 | EXTRA_OEMAKE:append = " \ |
diff --git a/recipes-security/optee-qoriq/optee-test.nxp.inc b/recipes-security/optee-qoriq/optee-test.nxp.inc index 6bf158d12..acbc2068d 100644 --- a/recipes-security/optee-qoriq/optee-test.nxp.inc +++ b/recipes-security/optee-qoriq/optee-test.nxp.inc | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | require recipes-security/optee-imx/optee-test-fslc.inc | 2 | require recipes-security/optee-imx/optee-test-fslc.inc |
| 3 | 3 | ||
| 4 | DEPENDS:remove = "optee-client optee-os-tadevkit" | 4 | DEPENDS:remove = "optee-client optee-os-tadevkit" |
| 5 | DEPENDS:append = "optee-client-qoriq optee-os-qoriq-tadevkit openssl" | 5 | DEPENDS:append = " optee-client-qoriq optee-os-qoriq-tadevkit openssl" |
| 6 | 6 | ||
| 7 | SRC_URI:remove = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https" | 7 | SRC_URI:remove = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https" |
| 8 | SRC_URI:remove = "file://run-ptest" | 8 | SRC_URI:remove = "file://run-ptest" |
| @@ -10,4 +10,8 @@ SRC_URI:prepend = "${OPTEE_TEST_SRC};branch=${OPTEE_TEST_BRANCH} " | |||
| 10 | 10 | ||
| 11 | OPTEE_TEST_SRC ?= "git://github.com/nxp-qoriq/optee_test.git;protocol=https" | 11 | OPTEE_TEST_SRC ?= "git://github.com/nxp-qoriq/optee_test.git;protocol=https" |
| 12 | 12 | ||
| 13 | REQUIRED_MACHINE_FEATURES = "optee" | ||
| 14 | |||
| 15 | inherit features_check | ||
| 16 | |||
| 13 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | 17 | COMPATIBLE_MACHINE = "(qoriq-arm64)" |
diff --git a/recipes-security/smw/crypto-af-alg_git.bb b/recipes-security/smw/crypto-af-alg_git.bb new file mode 100644 index 000000000..3ec485b3b --- /dev/null +++ b/recipes-security/smw/crypto-af-alg_git.bb | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | # Copyright 2026 NXP | ||
| 2 | |||
| 3 | SUMMARY = "NXP i.MX CRYPTO AF_ALG" | ||
| 4 | DESCRIPTION = "NXP i.MX crypto af alg tool to perform symmetric operation" | ||
| 5 | HOMEPAGE = "https://github.com/nxp-imx/crypto_af_alg" | ||
| 6 | SECTION = "base" | ||
| 7 | LICENSE = "BSD-3-Clause" | ||
| 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4ef68f113b9400b1140be9b69208a816" | ||
| 9 | |||
| 10 | SRCBRANCH = "lf-6.18.2_1.0.0" | ||
| 11 | CRYPTO_AF_ALG_SRC ?= "git://github.com/nxp-imx/crypto_af_alg.git;protocol=https" | ||
| 12 | SRC_URI = "${CRYPTO_AF_ALG_SRC};branch=${SRCBRANCH}" | ||
| 13 | |||
| 14 | SRCREV = "2fb11a600af90c80b8bb23368d1d6831c5deb973" | ||
| 15 | |||
| 16 | TARGET_CC_ARCH += "${LDFLAGS}" | ||
| 17 | |||
| 18 | do_install () { | ||
| 19 | oe_runmake DESTDIR=${D} install | ||
| 20 | } | ||
| 21 | |||
| 22 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | ||
diff --git a/recipes-security/smw/files/0001-Fixed-discarded-qualifiers-error.patch b/recipes-security/smw/files/0001-Fixed-discarded-qualifiers-error.patch new file mode 100644 index 000000000..109a739ae --- /dev/null +++ b/recipes-security/smw/files/0001-Fixed-discarded-qualifiers-error.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | diff --git a/osal/linux/obj_db.c b/osal/linux/obj_db.c | ||
| 4 | index 446a08b1..18e4931b 100644 | ||
| 5 | --- a/osal/linux/obj_db.c | ||
| 6 | +++ b/osal/linux/obj_db.c | ||
| 7 | @@ -1203,7 +1203,7 @@ static void close_db_file(struct obj_db *db) | ||
| 8 | static int create_directory(const char *filename) | ||
| 9 | { | ||
| 10 | int ret = -1; | ||
| 11 | - char *end = NULL; | ||
| 12 | + const char *end = NULL; | ||
| 13 | char *directory = NULL; | ||
| 14 | size_t length = 0; | ||
| 15 | int *err = NULL; | ||
| 16 | diff --git a/pkcs11/tests/callback.c b/pkcs11/tests/callback.c | ||
| 17 | index 3e0ffbf4..02dc2f91 100644 | ||
| 18 | --- a/pkcs11/tests/callback.c | ||
| 19 | +++ b/pkcs11/tests/callback.c | ||
| 20 | @@ -245,7 +245,7 @@ void tests_pkcs11_callback(void *lib_hdl, CK_VOID_PTR pfunc) | ||
| 21 | |||
| 22 | TEST_START(); | ||
| 23 | |||
| 24 | - mp_args.testname = strrchr(__func__, '_'); | ||
| 25 | + mp_args.testname = (char *) strrchr(__func__, '_'); | ||
| 26 | if (CHECK_EXPECTED(mp_args.testname, "Unable to get function name\n") || | ||
| 27 | !mp_args.testname) | ||
| 28 | goto end; | ||
diff --git a/recipes-security/smw/itest_git.bb b/recipes-security/smw/itest_git.bb new file mode 100644 index 000000000..442f5fb89 --- /dev/null +++ b/recipes-security/smw/itest_git.bb | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | # Copyright 2026 NXP | ||
| 2 | SUMMARY = "NXP i.MX Itest" | ||
| 3 | DESCRIPTION = "NXP i.MX Itest" | ||
| 4 | HOMEPAGE = "https://github.com/nxp-imx/itest" | ||
| 5 | SECTION = "base" | ||
| 6 | LICENSE = "BSD-3-Clause" | ||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=8636bd68fc00cc6a3809b7b58b45f982" | ||
| 8 | |||
| 9 | SRC_URI = "${ITEST_SRC};branch=${SRCBRANCH}" | ||
| 10 | ITEST_SRC ?= "git://github.com/nxp-imx/itest.git;protocol=https" | ||
| 11 | SRCBRANCH = "lf-6.18.2_1.0.0" | ||
| 12 | SRCREV = "37533de97b8f5f430caa00e3560fdbd4483d893c" | ||
| 13 | |||
| 14 | inherit cmake | ||
| 15 | |||
| 16 | PACKAGECONFIG:mx8dxl-nxp-bsp ??= "ele-seco" | ||
| 17 | PACKAGECONFIG:mx8ulp-nxp-bsp ??= "ele" | ||
| 18 | PACKAGECONFIG:mx91-nxp-bsp ??= "ele" | ||
| 19 | PACKAGECONFIG:mx93-nxp-bsp ??= "ele" | ||
| 20 | PACKAGECONFIG:mx943-nxp-bsp ??= "ele ele-seco prime" | ||
| 21 | PACKAGECONFIG:mx95-nxp-bsp ??= "ele ele-seco" | ||
| 22 | PACKAGECONFIG:mx952-nxp-bsp ??= "ele ele-seco prime" | ||
| 23 | |||
| 24 | PACKAGECONFIG[ele] = "-DELE=1,,imx-secure-enclave" | ||
| 25 | PACKAGECONFIG[ele-seco] = "-DV2X=1,,imx-secure-enclave-seco" | ||
| 26 | PACKAGECONFIG[prime] = "-DPRIME=1,,imx-secure-enclave-prime" | ||
| 27 | |||
| 28 | EXTRA_OECMAKE = "\ | ||
| 29 | -DOPENSSL_PATH="${STAGING_DIR_HOST}/usr"\ | ||
| 30 | -DELE_LIB_PATH="${STAGING_DIR_HOST}/usr"\ | ||
| 31 | -DLIB_PATH="${STAGING_DIR_HOST}${libdir}"" | ||
| 32 | |||
| 33 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | ||
| 34 | |||
| 35 | COMPATIBLE_MACHINE = "(mx8dxl-nxp-bsp|mx8ulp-nxp-bsp|mx9-nxp-bsp)" | ||
diff --git a/recipes-security/smw/keyctl-caam_git.bb b/recipes-security/smw/keyctl-caam_git.bb index f147e1148..cfa1b80c4 100644 --- a/recipes-security/smw/keyctl-caam_git.bb +++ b/recipes-security/smw/keyctl-caam_git.bb | |||
| @@ -2,19 +2,24 @@ | |||
| 2 | 2 | ||
| 3 | SUMMARY = "NXP i.MX CAAM Keyctl" | 3 | SUMMARY = "NXP i.MX CAAM Keyctl" |
| 4 | DESCRIPTION = "NXP i.MX keyctl tool to manage CAAM Keys" | 4 | DESCRIPTION = "NXP i.MX keyctl tool to manage CAAM Keys" |
| 5 | HOMEPAGE = "https://github.com/nxp-imx/keyctl_caam" | ||
| 5 | SECTION = "base" | 6 | SECTION = "base" |
| 6 | LICENSE = "BSD-3-Clause" | 7 | LICENSE = "BSD-3-Clause" |
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=8636bd68fc00cc6a3809b7b58b45f982" | 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=8636bd68fc00cc6a3809b7b58b45f982" |
| 8 | 9 | ||
| 9 | SRCBRANCH = "master" | 10 | SRCBRANCH = "lf-6.18.2_1.0.0" |
| 10 | SRC_URI = "git://github.com/nxp-imx/keyctl_caam.git;protocol=https;branch=${SRCBRANCH}" | 11 | SRC_URI = "git://github.com/nxp-imx/keyctl_caam.git;protocol=https;branch=${SRCBRANCH}" |
| 11 | 12 | ||
| 12 | SRCREV = "81dc06cdb9c4d0d4ba10459d85af9a8603774948" | 13 | SRCREV = "71cb18f17d766145217a5517748e37e250b055bf" |
| 14 | |||
| 15 | DEPENDS = "openssl" | ||
| 13 | 16 | ||
| 14 | TARGET_CC_ARCH += "${LDFLAGS}" | 17 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 15 | 18 | ||
| 19 | EXTRA_OEMAKE = "OPENSSL_PATH=${STAGING_INCDIR}" | ||
| 20 | |||
| 16 | do_install () { | 21 | do_install () { |
| 17 | oe_runmake DESTDIR=${D} install | 22 | oe_runmake DESTDIR=${D} install |
| 18 | } | 23 | } |
| 19 | 24 | ||
| 20 | COMPATIBLE_MACHINE = "(imx-generic-bsp|qoriq)" | 25 | COMPATIBLE_MACHINE = "(imx-generic-bsp|qoriq)" |
diff --git a/recipes-security/smw/smw_5.3.bb b/recipes-security/smw/smw_5.3.bb new file mode 100644 index 000000000..37452720a --- /dev/null +++ b/recipes-security/smw/smw_5.3.bb | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | # Copyright 2020-2026 NXP | ||
| 2 | require recipes-security/optee-imx/optee-fslc.inc | ||
| 3 | |||
| 4 | SUMMARY = "NXP i.MX Security Middleware Library" | ||
| 5 | HOMEPAGE = "https://github.com/nxp-imx/imx-smw" | ||
| 6 | DESCRIPTION = "NXP i.MX Security Middleware Library" | ||
| 7 | SECTION = "base" | ||
| 8 | LICENSE = "BSD-3-Clause" | ||
| 9 | LICENSE = "Apache-2.0 & BSD-3-Clause & Zlib" | ||
| 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ff20c8e51b28869d9cdec70a818d163f \ | ||
| 11 | file://${PSA_ARCH_TESTS_SRC_PATH}/LICENSE.md;md5=2a944942e1496af1886903d274dedb13" | ||
| 12 | |||
| 13 | DEPENDS = "\ | ||
| 14 | json-c \ | ||
| 15 | optee-client \ | ||
| 16 | optee-os-tadevkit \ | ||
| 17 | python3-cryptography-native \ | ||
| 18 | sqlite3 \ | ||
| 19 | " | ||
| 20 | |||
| 21 | SRC_URI = "${SMW_LIB_SRC};branch=${SRCBRANCH_smw};name=smw \ | ||
| 22 | ${PSA_LIB_SRC};branch=${SRCBRANCH_psa};name=psa;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/${PSA_ARCH_TESTS_SRC_PATH}" | ||
| 23 | SRC_URI += "file://0001-Fixed-discarded-qualifiers-error.patch" | ||
| 24 | SMW_LIB_SRC ?= "git://github.com/nxp-imx/imx-smw.git;protocol=https" | ||
| 25 | PSA_LIB_SRC ?= "git://github.com/ARM-software/psa-arch-tests.git;protocol=https" | ||
| 26 | PSA_ARCH_TESTS_SRC_PATH = "../psa-arch-tests" | ||
| 27 | |||
| 28 | SRCBRANCH_smw = "release/version_5.x" | ||
| 29 | SRCBRANCH_psa = "main" | ||
| 30 | SRCREV_smw = "c643587073584057700f39098ab12f536a21600d" | ||
| 31 | SRCREV_psa = "463cb95ada820bc6f758d50066cf8c0ed5cc3a02" | ||
| 32 | SRCREV_FORMAT = "smw_psa" | ||
| 33 | |||
| 34 | inherit cmake features_check python3native | ||
| 35 | |||
| 36 | REQUIRED_MACHINE_FEATURES = "optee" | ||
| 37 | |||
| 38 | PACKAGECONFIG ??= "${PACKAGECONFIG_DRIVERS} ${PACKAGECONFIG_FEATURES}" | ||
| 39 | PACKAGECONFIG_DRIVERS = "" | ||
| 40 | PACKAGECONFIG_DRIVERS:mx8x-nxp-bsp = "ele-seco" | ||
| 41 | PACKAGECONFIG_DRIVERS:mx8ulp-nxp-bsp = "ele" | ||
| 42 | PACKAGECONFIG_DRIVERS:mx91-nxp-bsp = "ele" | ||
| 43 | PACKAGECONFIG_DRIVERS:mx93-nxp-bsp = "ele" | ||
| 44 | PACKAGECONFIG_DRIVERS:mx943-nxp-bsp = "ele" | ||
| 45 | PACKAGECONFIG_DRIVERS:mx95-nxp-bsp = "ele" | ||
| 46 | |||
| 47 | PACKAGECONFIG_FEATURES = "" | ||
| 48 | PACKAGECONFIG_FEATURES:mx91-nxp-bsp = "tls" | ||
| 49 | PACKAGECONFIG_FEATURES:mx93-nxp-bsp = "tls" | ||
| 50 | PACKAGECONFIG_FEATURES:mx943-nxp-bsp = "tls" | ||
| 51 | PACKAGECONFIG_FEATURES:mx95-nxp-bsp = "tls" | ||
| 52 | |||
| 53 | PACKAGECONFIG[ele] = "-DELE_ROOT=${STAGING_DIR_HOST},,imx-secure-enclave,,,ele-seco" | ||
| 54 | PACKAGECONFIG[ele-seco] = "-DSECO_ROOT=${STAGING_DIR_HOST},,imx-secure-enclave-seco,,,ele" | ||
| 55 | PACKAGECONFIG[tls] = "-DENABLE_TLS=ON,-DENABLE_TLS=OFF,openssl" | ||
| 56 | |||
| 57 | CFLAGS[unexport] = "1" | ||
| 58 | CPPFLAGS[unexport] = "1" | ||
| 59 | AS[unexport] = "1" | ||
| 60 | LD[unexport] = "1" | ||
| 61 | |||
| 62 | # setting the linker options | ||
| 63 | TARGET_LDFLAGS:remove = "${DEBUG_PREFIX_MAP}" | ||
| 64 | |||
| 65 | EXTRA_OECMAKE = "\ | ||
| 66 | -DYOCTO_BUILD=ON \ | ||
| 67 | -DTA_DEV_KIT_ROOT=${TA_DEV_KIT_DIR} \ | ||
| 68 | -DTEEC_ROOT=${STAGING_DIR_HOST} \ | ||
| 69 | -DJSONC_ROOT="${COMPONENTS_DIR}/${TARGET_ARCH}/json-c/usr"\ | ||
| 70 | -DPSA_ARCH_TESTS_SRC_PATH=${PSA_ARCH_TESTS_SRC_PATH} \ | ||
| 71 | -DTEE_TA_DESTDIR=${nonarch_base_libdir} \ | ||
| 72 | " | ||
| 73 | |||
| 74 | OECMAKE_TARGET_COMPILE += "build_tests" | ||
| 75 | OECMAKE_TARGET_INSTALL += "install_tests" | ||
| 76 | |||
| 77 | PACKAGES =+ "${PN}-tests" | ||
| 78 | |||
| 79 | FILES:${PN} += "${nonarch_base_libdir}/optee_armtz/*" | ||
| 80 | |||
| 81 | INSANE_SKIP:${PN}-dbg = "buildpaths" | ||
| 82 | |||
| 83 | FILES:${PN}-tests = "${bindir}/* ${datadir}/${BPN}/*" | ||
| 84 | RDEPENDS:${PN}-tests = "cmake" | ||
| 85 | INSANE_SKIP:${PN}-tests = "buildpaths" | ||
| 86 | |||
| 87 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | ||
| 88 | |||
| 89 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | ||
diff --git a/recipes-security/smw/smw_git.bb b/recipes-security/smw/smw_git.bb deleted file mode 100644 index dbb59d2f3..000000000 --- a/recipes-security/smw/smw_git.bb +++ /dev/null | |||
| @@ -1,64 +0,0 @@ | |||
| 1 | # Copyright 2020-23 NXP | ||
| 2 | |||
| 3 | SUMMARY = "NXP i.MX Security Middleware Library" | ||
| 4 | DESCRIPTION = "NXP i.MX Security Middleware Library" | ||
| 5 | SECTION = "base" | ||
| 6 | LICENSE = "BSD-3-Clause" | ||
| 7 | LICENSE = "Apache-2.0 & BSD-3-Clause & Zlib" | ||
| 8 | LIC_FILES_CHKSUM = "file://LICENSE;md5=8636bd68fc00cc6a3809b7b58b45f982 \ | ||
| 9 | file://../psa-arch-tests/LICENSE.md;md5=2a944942e1496af1886903d274dedb13" | ||
| 10 | |||
| 11 | DEPENDS = "json-c optee-os optee-client python3-cryptography-native" | ||
| 12 | DEPENDS:append:mx8qxp-nxp-bsp = " imx-seco-libs" | ||
| 13 | DEPENDS:append:mx8dx-nxp-bsp = " imx-seco-libs" | ||
| 14 | DEPENDS:append:mx8ulp-nxp-bsp = " imx-secure-enclave" | ||
| 15 | |||
| 16 | SRC_URI = "git://github.com/nxp-imx/imx-smw.git;protocol=https;branch=release/version_2.x;name=smw;destsuffix=git/smw \ | ||
| 17 | git://github.com/ARM-software/psa-arch-tests.git;protocol=https;branch=main;name=psa;destsuffix=git/psa-arch-tests \ | ||
| 18 | " | ||
| 19 | SRCREV_smw = "f0570b3e8cb5f68d54edc4f9dd7cb984f6f604ed" | ||
| 20 | SRCREV_psa = "463cb95ada820bc6f758d50066cf8c0ed5cc3a02" | ||
| 21 | SRCREV_FORMAT = "smw_psa" | ||
| 22 | S = "${UNPACKDIR}/git/smw" | ||
| 23 | |||
| 24 | inherit cmake python3native | ||
| 25 | |||
| 26 | CFLAGS[unexport] = "1" | ||
| 27 | CPPFLAGS[unexport] = "1" | ||
| 28 | AS[unexport] = "1" | ||
| 29 | LD[unexport] = "1" | ||
| 30 | |||
| 31 | # setting the linker options | ||
| 32 | TARGET_LDFLAGS:remove = "${DEBUG_PREFIX_MAP}" | ||
| 33 | |||
| 34 | OPTEE_OS_TA_EXPORT_DIR:aarch64 = "${STAGING_INCDIR}/optee/export-user_ta_arm64" | ||
| 35 | OPTEE_OS_TA_EXPORT_DIR:arm = "${STAGING_INCDIR}/optee/export-user_ta_arm32" | ||
| 36 | |||
| 37 | # Needs to sign OPTEE TAs | ||
| 38 | export OPENSSL_MODULES = "${STAGING_LIBDIR_NATIVE}/ossl-modules" | ||
| 39 | |||
| 40 | EXTRA_OECMAKE = " \ | ||
| 41 | -DTA_DEV_KIT_ROOT=${OPTEE_OS_TA_EXPORT_DIR} \ | ||
| 42 | -DTEEC_ROOT=${STAGING_DIR_HOST} \ | ||
| 43 | -DJSONC_ROOT="${COMPONENTS_DIR}/${TARGET_ARCH}/json-c/usr" \ | ||
| 44 | -DPSA_ARCH_TESTS_SRC_PATH=../${PSA_ARCH_TESTS_SRC_PATH} \ | ||
| 45 | " | ||
| 46 | EXTRA_OECMAKE:append:mx8qxp-nxp-bsp = "-DSECO_ROOT=${STAGING_DIR_HOST}" | ||
| 47 | EXTRA_OECMAKE:append:mx8dx-nxp-bsp = "-DSECO_ROOT=${STAGING_DIR_HOST}" | ||
| 48 | EXTRA_OECMAKE:append:mx8ulp-nxp-bsp = "-DELE_ROOT=${STAGING_DIR_HOST}" | ||
| 49 | EXTRA_OECMAKE_IMX:mx93-nxp-bsp = "-DELE_ROOT=${STAGING_DIR_HOST}" | ||
| 50 | |||
| 51 | OECMAKE_TARGET_COMPILE += "build_tests" | ||
| 52 | OECMAKE_TARGET_INSTALL += "install_tests" | ||
| 53 | |||
| 54 | INSANE_SKIP_${PN}-tests = "textrel" | ||
| 55 | |||
| 56 | PACKAGES =+ "${PN}-tests" | ||
| 57 | |||
| 58 | FILES:${PN} += "${base_libdir}/optee_armtz/*" | ||
| 59 | |||
| 60 | FILES:${PN}-tests = "${bindir}/* ${datadir}/${BPN}/*" | ||
| 61 | |||
| 62 | RDEPENDS:${PN}-tests += "bash cmake" | ||
| 63 | |||
| 64 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | ||
