diff options
Diffstat (limited to 'recipes-security')
31 files changed, 209 insertions, 299 deletions
diff --git a/recipes-security/optee-imx/optee-client-fslc-imx.inc b/recipes-security/optee-imx/optee-client-fslc-imx.inc index 7aeff9fd5..1112a864d 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-scarthgap/imx-6.6.52-2.2.0.xml#L37 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L37 |
| 3 | 3 | ||
| 4 | require optee-client-fslc.inc | 4 | require optee-client-fslc.inc |
| 5 | 5 | ||
| @@ -10,27 +10,8 @@ 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 | |||
| 13 | inherit pkgconfig | 15 | inherit pkgconfig |
| 14 | 16 | ||
| 15 | EXTRA_OECMAKE += "-DCFG_TEE_CLIENT_LOAD_PATH=${nonarch_base_libdir}" | 17 | EXTRA_OECMAKE += "-DCFG_TEE_CLIENT_LOAD_PATH=${nonarch_base_libdir}" |
| 16 | |||
| 17 | # Copy the udev rule from the libts recipe for starting tee-supplicant@.service | ||
| 18 | SRC_URI += "file://tee-udev.rules" | ||
| 19 | # Unix group name for dev/tee* ownership. | ||
| 20 | TEE_GROUP_NAME ?= "teeclnt" | ||
| 21 | do_install:append () { | ||
| 22 | if ${@oe.utils.conditional('VIRTUAL-RUNTIME_dev_manager', 'busybox-mdev', 'false', 'true', d)}; then | ||
| 23 | install -d ${D}${nonarch_base_libdir}/udev/rules.d/ | ||
| 24 | install -m 755 ${UNPACKDIR}/tee-udev.rules ${D}${nonarch_base_libdir}/udev/rules.d/ | ||
| 25 | sed -i -e "s/teeclnt/${TEE_GROUP_NAME}/" ${D}${nonarch_base_libdir}/udev/rules.d/tee-udev.rules | ||
| 26 | fi | ||
| 27 | |||
| 28 | if [ "${libdir}" != "${nonarch_base_libdir}" ]; then | ||
| 29 | rm -rf ${D}${libdir}/systemd | ||
| 30 | fi | ||
| 31 | } | ||
| 32 | inherit ${@oe.utils.conditional('VIRTUAL-RUNTIME_dev_manager', 'busybox-mdev', '', 'useradd', d)} | ||
| 33 | USERADD_PACKAGES = "${PN}" | ||
| 34 | GROUPADD_PARAM:${PN} = "--system ${TEE_GROUP_NAME}" | ||
| 35 | |||
| 36 | FILES:${PN} += "${libdir}/* ${includedir}/*" | ||
diff --git a/recipes-security/optee-imx/optee-client-fslc.inc b/recipes-security/optee-imx/optee-client-fslc.inc index 455bdd780..70a25fe6c 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-scarthgap/imx-6.6.52-2.2.0.xml#L30 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L30 |
| 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" |
| @@ -8,32 +8,39 @@ HOMEPAGE = "https://www.op-tee.org/" | |||
| 8 | LICENSE = "BSD-2-Clause" | 8 | LICENSE = "BSD-2-Clause" |
| 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" | 9 | LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" |
| 10 | 10 | ||
| 11 | inherit systemd update-rc.d cmake | 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@.service \ | ||
| 16 | file://tee-supplicant.sh \ | 15 | file://tee-supplicant.sh \ |
| 17 | " | 16 | " |
| 18 | 17 | ||
| 19 | UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" | 18 | UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" |
| 20 | 19 | ||
| 21 | S = "${WORKDIR}/git" | ||
| 22 | |||
| 23 | EXTRA_OECMAKE = " \ | 20 | EXTRA_OECMAKE = " \ |
| 24 | -DBUILD_SHARED_LIBS=ON \ | 21 | -DBUILD_SHARED_LIBS=ON \ |
| 25 | -DCFG_TEE_FS_PARENT_PATH='${localstatedir}/lib/tee' \ | 22 | -DCFG_USE_PKGCONFIG=ON \ |
| 26 | " | 23 | " |
| 24 | |||
| 25 | # libts uses /dev/tee devices too. Add a common variable to allow configuring the same group. | ||
| 26 | TEE_GROUP_NAME ?= "tee" | ||
| 27 | |||
| 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/" | ||
| 30 | EXTRA_OECMAKE += " -DCFG_TEE_GROUP=${TEE_GROUP_NAME} -DCFG_TEEPRIV_GROUP=teepriv" | ||
| 31 | |||
| 27 | EXTRA_OECMAKE:append:toolchain-clang = " -DCFG_WERROR=0" | 32 | EXTRA_OECMAKE:append:toolchain-clang = " -DCFG_WERROR=0" |
| 28 | 33 | ||
| 29 | do_install:append() { | 34 | do_install:append() { |
| 30 | install -D -p -m0644 ${UNPACKDIR}/tee-supplicant@.service ${D}${systemd_system_unitdir}/tee-supplicant@.service | 35 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
| 31 | install -D -p -m0755 ${UNPACKDIR}/tee-supplicant.sh ${D}${sysconfdir}/init.d/tee-supplicant | 36 | install -D -p -m0755 ${UNPACKDIR}/tee-supplicant.sh ${D}${sysconfdir}/init.d/tee-supplicant |
| 32 | 37 | sed -i -e s:@sysconfdir@:${sysconfdir}:g \ | |
| 33 | sed -i -e s:@sysconfdir@:${sysconfdir}:g \ | 38 | -e s:@sbindir@:${sbindir}:g \ |
| 34 | -e s:@sbindir@:${sbindir}:g \ | 39 | -e s:@supluser@:teesuppl:g \ |
| 35 | ${D}${systemd_system_unitdir}/tee-supplicant@.service \ | 40 | -e s:@suplgroup@:teesuppl:g \ |
| 36 | ${D}${sysconfdir}/init.d/tee-supplicant | 41 | ${D}${sysconfdir}/init.d/tee-supplicant |
| 42 | fi | ||
| 43 | install -o teesuppl -g teesuppl -m 0700 -d ${D}${localstatedir}/lib/tee | ||
| 37 | } | 44 | } |
| 38 | 45 | ||
| 39 | SYSTEMD_SERVICE:${PN} = "tee-supplicant@.service" | 46 | SYSTEMD_SERVICE:${PN} = "tee-supplicant@.service" |
| @@ -41,3 +48,13 @@ SYSTEMD_SERVICE:${PN} = "tee-supplicant@.service" | |||
| 41 | INITSCRIPT_PACKAGES = "${PN}" | 48 | INITSCRIPT_PACKAGES = "${PN}" |
| 42 | INITSCRIPT_NAME:${PN} = "tee-supplicant" | 49 | INITSCRIPT_NAME:${PN} = "tee-supplicant" |
| 43 | INITSCRIPT_PARAMS:${PN} = "start 10 1 2 3 4 5 . stop 90 0 6 ." | 50 | INITSCRIPT_PARAMS:${PN} = "start 10 1 2 3 4 5 . stop 90 0 6 ." |
| 51 | |||
| 52 | FILES:${PN} += "${nonarch_base_libdir}/udev/rules.d/" | ||
| 53 | |||
| 54 | # Users and groups: | ||
| 55 | # TEE_GROUP_NAME group to access /dev/tee* | ||
| 56 | # teepriv group to acess /dev/teepriv*, only tee-supplicant | ||
| 57 | # teesuppl user and group teesuppl to run tee-supplicant | ||
| 58 | USERADD_PACKAGES = "${PN}" | ||
| 59 | GROUPADD_PARAM:${PN} = "--system ${TEE_GROUP_NAME}; --system teepriv; --system teesuppl" | ||
| 60 | USERADD_PARAM:${PN} = "--system -g teesuppl --groups teepriv --home-dir ${localstatedir}/lib/tee -M --shell /sbin/nologin teesuppl;" | ||
diff --git a/recipes-security/optee-imx/optee-client/0001-tee-supplicant-Fix-non-arch-service-unit-install-pat.patch b/recipes-security/optee-imx/optee-client/0001-tee-supplicant-Fix-non-arch-service-unit-install-pat.patch new file mode 100644 index 000000000..631e08019 --- /dev/null +++ b/recipes-security/optee-imx/optee-client/0001-tee-supplicant-Fix-non-arch-service-unit-install-pat.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 5ffab66dda3e25f0b2ebc5115013c4234d048703 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
| 3 | Date: Mon, 21 Apr 2025 08:47:29 -0500 | ||
| 4 | Subject: [PATCH] tee-supplicant: Fix non-arch service unit install path | ||
| 5 | |||
| 6 | A 64-bit build with multilib enabled fails: | ||
| 7 | ``` | ||
| 8 | ERROR: optee-client-4.4.0-r0 do_package: Didn't find service unit 'tee-supplicant@.service', specified in SYSTEMD_SERVICE:optee-client. Also looked for service unit 'tee-supplicant@.service'. | ||
| 9 | ``` | ||
| 10 | |||
| 11 | The problem is the service unit is installed in the arch-specific folder | ||
| 12 | /usr/lib64/systemd/system, but it is non-arch and should be in | ||
| 13 | /usr/lib/systemd/system. | ||
| 14 | |||
| 15 | Upstream-Status: Pending | ||
| 16 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
| 17 | --- | ||
| 18 | tee-supplicant/CMakeLists.txt | 2 +- | ||
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git a/tee-supplicant/CMakeLists.txt b/tee-supplicant/CMakeLists.txt | ||
| 22 | index 8df9bef..3ea058c 100644 | ||
| 23 | --- a/tee-supplicant/CMakeLists.txt | ||
| 24 | +++ b/tee-supplicant/CMakeLists.txt | ||
| 25 | @@ -119,6 +119,6 @@ endif() | ||
| 26 | ################################################################################ | ||
| 27 | install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}) | ||
| 28 | configure_file(tee-supplicant@.service.in tee-supplicant@.service @ONLY) | ||
| 29 | -install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/tee-supplicant@.service DESTINATION ${CMAKE_INSTALL_LIBDIR}/systemd/system) | ||
| 30 | +install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/tee-supplicant@.service DESTINATION lib/systemd/system) | ||
| 31 | configure_file(optee-udev.rules.in optee-udev.rules @ONLY) | ||
| 32 | install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}/optee-udev.rules DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/udev/rules.d) | ||
| 33 | -- | ||
| 34 | 2.34.1 | ||
| 35 | |||
diff --git a/recipes-security/optee-imx/optee-client/optee-udev.rules b/recipes-security/optee-imx/optee-client/optee-udev.rules new file mode 100644 index 000000000..075f469c0 --- /dev/null +++ b/recipes-security/optee-imx/optee-client/optee-udev.rules | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | KERNEL=="tee[0-9]*", MODE="0660", OWNER="root", GROUP="teeclnt", TAG+="systemd" | ||
| 2 | |||
| 3 | # If a /dev/teepriv[0-9]* device is detected, start an instance of | ||
| 4 | # tee-supplicant.service with the device name as parameter | ||
| 5 | KERNEL=="teepriv[0-9]*", MODE="0660", OWNER="root", GROUP="teeclnt", \ | ||
| 6 | TAG+="systemd", ENV{SYSTEMD_WANTS}+="tee-supplicant@%k.service" | ||
diff --git a/recipes-security/optee-imx/optee-client_4.4.0.imx.bb b/recipes-security/optee-imx/optee-client_4.4.0.imx.bb deleted file mode 100644 index 322f998fc..000000000 --- a/recipes-security/optee-imx/optee-client_4.4.0.imx.bb +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | require optee-client-fslc-imx.inc | ||
| 2 | |||
| 3 | SRCBRANCH = "lf-6.6.52_2.2.0" | ||
| 4 | SRCREV = "d221676a58b305bddbf97db00395205b3038de8e" | ||
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 new file mode 100644 index 000000000..b5a185da1 --- /dev/null +++ b/recipes-security/optee-imx/optee-client_4.6.0.imx.bb | |||
| @@ -0,0 +1,4 @@ | |||
| 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-fslc.inc b/recipes-security/optee-imx/optee-fslc.inc index c89746dc4..599dda522 100644 --- a/recipes-security/optee-imx/optee-fslc.inc +++ b/recipes-security/optee-imx/optee-fslc.inc | |||
| @@ -1,14 +1,16 @@ | |||
| 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-scarthgap/imx-6.6.52-2.2.0.xml#L30 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L30 |
| 3 | 3 | ||
| 4 | UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" | 4 | UPSTREAM_CHECK_GITTAGREGEX = "^(?P<pver>\d+(\.\d+)+)$" |
| 5 | 5 | ||
| 6 | COMPATIBLE_MACHINE ?= "invalid" | 6 | COMPATIBLE_MACHINE ?= "invalid" |
| 7 | COMPATIBLE_MACHINE:genericarm64 ?= "genericarm64" | ||
| 7 | COMPATIBLE_MACHINE:qemuarm64 ?= "qemuarm64" | 8 | COMPATIBLE_MACHINE:qemuarm64 ?= "qemuarm64" |
| 8 | COMPATIBLE_MACHINE:qemuarm ?= "qemuarm" | 9 | COMPATIBLE_MACHINE:qemuarm ?= "qemuarm" |
| 9 | # Please add supported machines below or set it in .bbappend or .conf | 10 | # Please add supported machines below or set it in .bbappend or .conf |
| 10 | 11 | ||
| 11 | OPTEEMACHINE ?= "${MACHINE}" | 12 | OPTEEMACHINE ?= "${MACHINE}" |
| 13 | OPTEEMACHINE:genericarm64 ?= "vexpress-qemu_armv8a" | ||
| 12 | OPTEEMACHINE:aarch64:qemuall ?= "vexpress-qemu_armv8a" | 14 | OPTEEMACHINE:aarch64:qemuall ?= "vexpress-qemu_armv8a" |
| 13 | OPTEEMACHINE:arm:qemuall ?= "vexpress-qemu_virt" | 15 | OPTEEMACHINE:arm:qemuall ?= "vexpress-qemu_virt" |
| 14 | 16 | ||
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 941182fe9..ffd217099 100644 --- a/recipes-security/optee-imx/optee-os-common-fslc-imx.inc +++ b/recipes-security/optee-imx/optee-os-common-fslc-imx.inc | |||
| @@ -1,6 +1,5 @@ | |||
| 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-scarthgap/imx-6.6.52-2.2.0.xml#L37 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L37 |
| 3 | |||
| 4 | require optee-os-fslc.inc | 3 | require optee-os-fslc.inc |
| 5 | 4 | ||
| 6 | DEPENDS:append:arm = "u-boot-mkimage-native" | 5 | DEPENDS:append:arm = "u-boot-mkimage-native" |
| @@ -38,6 +37,7 @@ OPTEEMACHINE:mx8mnul-nxp-bsp = "imx-mx8mnevk" | |||
| 38 | OPTEEMACHINE:mx8ulp-nxp-bsp = "imx-mx8ulpevk" | 37 | OPTEEMACHINE:mx8ulp-nxp-bsp = "imx-mx8ulpevk" |
| 39 | OPTEEMACHINE:mx91-nxp-bsp = "imx-mx91evk" | 38 | OPTEEMACHINE:mx91-nxp-bsp = "imx-mx91evk" |
| 40 | OPTEEMACHINE:mx93-nxp-bsp = "imx-mx93evk" | 39 | OPTEEMACHINE:mx93-nxp-bsp = "imx-mx93evk" |
| 40 | OPTEEMACHINE:mx943-nxp-bsp = "imx-mx943evk" | ||
| 41 | OPTEEMACHINE:mx95-nxp-bsp = "imx-mx95evk" | 41 | OPTEEMACHINE:mx95-nxp-bsp = "imx-mx95evk" |
| 42 | 42 | ||
| 43 | # Strip the leading imx- | 43 | # Strip the leading imx- |
diff --git a/recipes-security/optee-imx/optee-os-fslc-imx.inc b/recipes-security/optee-imx/optee-os-fslc-imx.inc index 5fe6a75a5..f46f666ee 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-scarthgap/imx-6.6.52-2.2.0.xml#L37 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L37 |
| 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 c1f1f48f5..4df1617d1 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-scarthgap/imx-6.6.52-2.2.0.xml#L30 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L30 |
| 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" |
| @@ -19,7 +19,6 @@ DEPENDS:append:toolchain-clang = " 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 | S = "${WORKDIR}/git" | ||
| 23 | B = "${WORKDIR}/build" | 22 | B = "${WORKDIR}/build" |
| 24 | 23 | ||
| 25 | EXTRA_OEMAKE += " \ | 24 | EXTRA_OEMAKE += " \ |
| @@ -27,7 +26,7 @@ EXTRA_OEMAKE += " \ | |||
| 27 | CFG_${OPTEE_CORE}_core=y \ | 26 | CFG_${OPTEE_CORE}_core=y \ |
| 28 | CROSS_COMPILE_core=${HOST_PREFIX} \ | 27 | CROSS_COMPILE_core=${HOST_PREFIX} \ |
| 29 | CROSS_COMPILE_ta_${OPTEE_ARCH}=${HOST_PREFIX} \ | 28 | CROSS_COMPILE_ta_${OPTEE_ARCH}=${HOST_PREFIX} \ |
| 30 | NOWERROR=1 \ | 29 | AFLAGS="${CFLAGS}" \ |
| 31 | ta-targets=ta_${OPTEE_ARCH} \ | 30 | ta-targets=ta_${OPTEE_ARCH} \ |
| 32 | O=${B} \ | 31 | O=${B} \ |
| 33 | " | 32 | " |
| @@ -40,7 +39,7 @@ AS[unexport] = "1" | |||
| 40 | LD[unexport] = "1" | 39 | LD[unexport] = "1" |
| 41 | 40 | ||
| 42 | do_compile:prepend() { | 41 | do_compile:prepend() { |
| 43 | PLAT_LIBGCC_PATH=$(${CC} -print-libgcc-file-name) | 42 | PLAT_LIBGCC_PATH=$(${CC} -print-libgcc-file-name) |
| 44 | } | 43 | } |
| 45 | 44 | ||
| 46 | do_compile() { | 45 | do_compile() { |
| @@ -79,8 +78,5 @@ FILES:${PN}-ta = "${nonarch_base_libdir}/optee_armtz/*" | |||
| 79 | 78 | ||
| 80 | # note: "textrel" is not triggered on all archs | 79 | # note: "textrel" is not triggered on all archs |
| 81 | INSANE_SKIP:${PN} = "textrel" | 80 | INSANE_SKIP:${PN} = "textrel" |
| 82 | # Build paths are currently embedded | ||
| 83 | INSANE_SKIP:${PN} += "buildpaths" | ||
| 84 | INSANE_SKIP:${PN}-dev = "staticdev" | 81 | INSANE_SKIP:${PN}-dev = "staticdev" |
| 85 | INHIBIT_PACKAGE_STRIP = "1" | 82 | INHIBIT_PACKAGE_STRIP = "1" |
| 86 | |||
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 18cf9a374..0b02c6908 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-scarthgap/imx-6.6.52-2.2.0.xml#L37 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L37 |
| 3 | 3 | ||
| 4 | require optee-os-common-fslc-imx.inc | 4 | require optee-os-common-fslc-imx.inc |
| 5 | 5 | ||
| @@ -22,6 +22,3 @@ do_deploy() { | |||
| 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.4.0.imx.bb b/recipes-security/optee-imx/optee-os-tadevkit_4.4.0.imx.bb deleted file mode 100644 index bb2e2cf6b..000000000 --- a/recipes-security/optee-imx/optee-os-tadevkit_4.4.0.imx.bb +++ /dev/null | |||
| @@ -1,4 +0,0 @@ | |||
| 1 | require optee-os-tadevkit-fslc-imx.inc | ||
| 2 | |||
| 3 | SRCBRANCH = "lf-6.6.52_2.2.0" | ||
| 4 | SRCREV = "60beb308810f9561a67fdb435388a64c85eb6dcb" | ||
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 new file mode 100644 index 000000000..92bdf00e7 --- /dev/null +++ b/recipes-security/optee-imx/optee-os-tadevkit_4.6.0.imx.bb | |||
| @@ -0,0 +1,4 @@ | |||
| 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_4.4.0.imx.bb b/recipes-security/optee-imx/optee-os_4.4.0.imx.bb deleted file mode 100644 index dc6d3901d..000000000 --- a/recipes-security/optee-imx/optee-os_4.4.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.6.52_2.2.0" | ||
| 6 | SRCREV = "60beb308810f9561a67fdb435388a64c85eb6dcb" | ||
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 new file mode 100644 index 000000000..ed2557bcb --- /dev/null +++ b/recipes-security/optee-imx/optee-os_4.6.0.imx.bb | |||
| @@ -0,0 +1,6 @@ | |||
| 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-test-fslc-imx.inc b/recipes-security/optee-imx/optee-test-fslc-imx.inc index ab16fd221..b4bb6031b 100644 --- a/recipes-security/optee-imx/optee-test-fslc-imx.inc +++ b/recipes-security/optee-imx/optee-test-fslc-imx.inc | |||
| @@ -1,6 +1,5 @@ | |||
| 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-scarthgap/imx-6.6.52-2.2.0.xml#L37 | 2 | # See: https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L37 |
| 3 | |||
| 4 | require optee-test-fslc.inc | 3 | require optee-test-fslc.inc |
| 5 | 4 | ||
| 6 | DEPENDS += "openssl" | 5 | DEPENDS += "openssl" |
| @@ -14,5 +13,6 @@ OPTEE_TEST_SRC ?= "git://github.com/nxp-imx/imx-optee-test.git;protocol=https" | |||
| 14 | 13 | ||
| 15 | EXTRA_OEMAKE:append:libc-musl = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}" | 14 | EXTRA_OEMAKE:append:libc-musl = " OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}" |
| 16 | CFLAGS:append:libc-musl = " -Wno-error=deprecated-declarations" | 15 | CFLAGS:append:libc-musl = " -Wno-error=deprecated-declarations" |
| 16 | CFLAGS += " -Wno-error=unterminated-string-initialization" | ||
| 17 | 17 | ||
| 18 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | 18 | 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 0fb5f878a..46d57ac41 100644 --- a/recipes-security/optee-imx/optee-test-fslc.inc +++ b/recipes-security/optee-imx/optee-test-fslc.inc | |||
| @@ -1,12 +1,11 @@ | |||
| 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-scarthgap/imx-6.6.52-2.2.0.xml#L30 | 2 | # See:https://github.com/nxp-imx/imx-manifest/blob/imx-linux-walnascar/imx-6.12.20-2.0.0.xml#L30 |
| 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" |
| 6 | HOMEPAGE = "https://www.op-tee.org/" | 6 | HOMEPAGE = "https://www.op-tee.org/" |
| 7 | 7 | ||
| 8 | LICENSE = "BSD-2-Clause & GPL-2.0-only" | 8 | LICENSE = "BSD-2-Clause & GPL-2.0-only" |
| 9 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" | ||
| 10 | 9 | ||
| 11 | inherit python3native ptest | 10 | inherit python3native ptest |
| 12 | inherit deploy | 11 | inherit deploy |
| @@ -18,7 +17,6 @@ SRC_URI = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https \ | |||
| 18 | file://run-ptest \ | 17 | file://run-ptest \ |
| 19 | " | 18 | " |
| 20 | 19 | ||
| 21 | S = "${WORKDIR}/git" | ||
| 22 | B = "${WORKDIR}/build" | 20 | B = "${WORKDIR}/build" |
| 23 | 21 | ||
| 24 | EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ | 22 | EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ |
diff --git a/recipes-security/optee-imx/optee-test_4.4.0.imx.bb b/recipes-security/optee-imx/optee-test_4.6.0.imx.bb index b4ac12714..78e933486 100644 --- a/recipes-security/optee-imx/optee-test_4.4.0.imx.bb +++ b/recipes-security/optee-imx/optee-test_4.6.0.imx.bb | |||
| @@ -9,5 +9,5 @@ LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a8fa504109e4cd7ea575bc49ea4be560 \ | |||
| 9 | file://LICENSE-GPL;md5=10e86b5d2a6cb0e2b9dcfdd26a9ac58d" | 9 | file://LICENSE-GPL;md5=10e86b5d2a6cb0e2b9dcfdd26a9ac58d" |
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | SRCBRANCH = "lf-6.6.52_2.2.0" | 12 | SRCBRANCH = "lf-6.12.20_2.0.0" |
| 13 | SRCREV = "dafc98ed8364d7281a9a7f0788dd0a2067844a59" | 13 | SRCREV = "010f088f05b5ebf392c6e235d6e53d391755722f" |
diff --git a/recipes-security/optee-qoriq/optee-client-qoriq_3.13.0.bb b/recipes-security/optee-qoriq/optee-client-qoriq_3.13.0.bb deleted file mode 100644 index 94123e435..000000000 --- a/recipes-security/optee-qoriq/optee-client-qoriq_3.13.0.bb +++ /dev/null | |||
| @@ -1,5 +0,0 @@ | |||
| 1 | require optee-client.nxp.inc | ||
| 2 | |||
| 3 | PV:append = "+git${SRCPV}" | ||
| 4 | |||
| 5 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-security/optee-qoriq/optee-client-qoriq_4.6.0.bb b/recipes-security/optee-qoriq/optee-client-qoriq_4.6.0.bb new file mode 100644 index 000000000..4b61f7c04 --- /dev/null +++ b/recipes-security/optee-qoriq/optee-client-qoriq_4.6.0.bb | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | require optee-client.nxp.inc | ||
| 2 | |||
| 3 | OPTEE_CLIENT_BRANCH = "lf-6.12.20_2.0.0" | ||
| 4 | SRCREV = "02e7f9213b0d7db9c35ebf1e41e733fc9c5a3f75" | ||
diff --git a/recipes-security/optee-qoriq/optee-client.nxp.inc b/recipes-security/optee-qoriq/optee-client.nxp.inc index c3933a243..590540cd8 100644 --- a/recipes-security/optee-qoriq/optee-client.nxp.inc +++ b/recipes-security/optee-qoriq/optee-client.nxp.inc | |||
| @@ -1,53 +1,22 @@ | |||
| 1 | # Copyright 2020-2021 NXP | 1 | # Copyright 2020-2021,2025 NXP |
| 2 | 2 | ||
| 3 | SUMMARY = "OPTEE Client libs" | 3 | require recipes-security/optee-imx/optee-client-fslc.inc |
| 4 | HOMEPAGE = "http://www.optee.org/" | ||
| 5 | LICENSE = "BSD" | ||
| 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b" | ||
| 7 | 4 | ||
| 8 | inherit python3native systemd | 5 | # The patch same as imx-optee, so point FILESEXTRAPATHS to optee-imx/optee-client, |
| 6 | # avoid duplicate copy files to optee-qoriq | ||
| 7 | FILESEXTRAPATHS:prepend := "${THISDIR}/../optee-imx/optee-client:" | ||
| 9 | 8 | ||
| 10 | SRC_URI = "git://github.com/nxp-qoriq/optee_client.git;protocol=https;nobranch=1" | 9 | DEPENDS = "util-linux-libuuid" |
| 11 | SRCREV = "7c9c423d00e96bf51debd5fe10fd70dce83be5cc" | ||
| 12 | 10 | ||
| 13 | FILESEXTRAPATHS:prepend := "${THISDIR}/optee-client:" | 11 | SRC_URI:remove = "git://github.com/OP-TEE/optee_client.git;branch=master;protocol=https" |
| 14 | SRC_URI += "file://tee-supplicant.service" | 12 | SRC_URI:prepend = "${OPTEE_CLIENT_SRC};branch=${OPTEE_CLIENT_BRANCH} " |
| 15 | 13 | ||
| 16 | S = "${WORKDIR}/git" | 14 | OPTEE_CLIENT_SRC ?= "git://github.com/nxp-qoriq/optee_client.git;protocol=https" |
| 17 | B = "${WORKDIR}/build" | ||
| 18 | 15 | ||
| 19 | OPTEE_ARCH ?= "arm32" | 16 | inherit pkgconfig |
| 20 | OPTEE_ARCH:armv7a = "arm32" | ||
| 21 | OPTEE_ARCH:aarch64 = "arm64" | ||
| 22 | 17 | ||
| 23 | EXTRA_OEMAKE = "ARCH=${OPTEE_ARCH} O=${B}" | 18 | do_install:append () { |
| 24 | 19 | if ! ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | |
| 25 | do_install () { | 20 | rm -rf ${D}${libdir}/systemd |
| 26 | oe_runmake -C ${S} install | 21 | fi |
| 27 | |||
| 28 | install -d ${D}${libdir}/ | ||
| 29 | install -p -m0644 ${B}/export${libdir}/libteec.so.1.0.0 ${D}${libdir}/ | ||
| 30 | ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1.0 | ||
| 31 | ln -sf libteec.so.1.0.0 ${D}${libdir}/libteec.so.1 | ||
| 32 | ln -sf libteec.so.1 ${D}${libdir}/libteec.so | ||
| 33 | |||
| 34 | install -D -p -m0644 ${B}/export/usr/lib/libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0.1.0 | ||
| 35 | ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0.1 | ||
| 36 | ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so.0 | ||
| 37 | ln -sf libckteec.so.0.1.0 ${D}${libdir}/libckteec.so | ||
| 38 | |||
| 39 | install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${bindir}/tee-supplicant | ||
| 40 | |||
| 41 | cp -a ${B}/export/usr/include ${D}${includedir} | ||
| 42 | |||
| 43 | install -d ${D}${systemd_system_unitdir}/ | ||
| 44 | install -m0644 ${UNPACKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/ | ||
| 45 | sed -i -e s:/etc:${sysconfdir}:g -e s:/usr/bin:${bindir}:g ${D}${systemd_system_unitdir}/tee-supplicant.service | ||
| 46 | } | 22 | } |
| 47 | |||
| 48 | SYSTEMD_SERVICE:${PN} = "tee-supplicant.service" | ||
| 49 | |||
| 50 | FILES:${PN} += "${libdir}/* ${includedir}/*" | ||
| 51 | |||
| 52 | INSANE_SKIP:${PN} = "ldflags dev-elf" | ||
| 53 | INSANE_SKIP:${PN}-dev = "ldflags dev-elf" | ||
diff --git a/recipes-security/optee-qoriq/optee-client/tee-supplicant.service b/recipes-security/optee-qoriq/optee-client/tee-supplicant.service deleted file mode 100644 index 0e2b4f6ba..000000000 --- a/recipes-security/optee-qoriq/optee-client/tee-supplicant.service +++ /dev/null | |||
| @@ -1,11 +0,0 @@ | |||
| 1 | [Unit] | ||
| 2 | Description=TEE Supplicant | ||
| 3 | |||
| 4 | [Service] | ||
| 5 | User=root | ||
| 6 | EnvironmentFile=-/etc/default/tee-supplicant | ||
| 7 | ExecStart=/usr/bin/tee-supplicant $OPTARGS | ||
| 8 | |||
| 9 | [Install] | ||
| 10 | WantedBy=basic.target | ||
| 11 | |||
diff --git a/recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.6.0.bb b/recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.6.0.bb new file mode 100644 index 000000000..e7847b81e --- /dev/null +++ b/recipes-security/optee-qoriq/optee-os-qoriq-tadevkit_4.6.0.bb | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | require optee-os.nxp.inc | ||
| 2 | |||
| 3 | SUMMARY = "OP-TEE Trusted OS TA devkit" | ||
| 4 | DESCRIPTION = "OP-TEE TA devkit for build TAs" | ||
| 5 | HOMEPAGE = "https://www.op-tee.org/" | ||
| 6 | |||
| 7 | DEPENDS += "python3-pycryptodome-native" | ||
| 8 | |||
| 9 | OPTEE_OS_BRANCH = "lf-6.12.20_2.0.0" | ||
| 10 | SRCREV = "87964807d80baf1dcfd89cafc66de34a1cf16bf3" | ||
| 11 | |||
| 12 | do_install() { | ||
| 13 | #install TA devkit | ||
| 14 | install -d ${D}${includedir}/optee/export-user_ta/ | ||
| 15 | for f in ${B}/export-ta_${OPTEE_ARCH}/* ; do | ||
| 16 | cp -aR $f ${D}${includedir}/optee/export-user_ta/ | ||
| 17 | done | ||
| 18 | } | ||
| 19 | |||
| 20 | do_deploy() { | ||
| 21 | echo "Do not inherit do_deploy from optee-os." | ||
| 22 | } | ||
| 23 | |||
| 24 | FILES:${PN} = "${includedir}/optee/" | ||
diff --git a/recipes-security/optee-qoriq/optee-os-qoriq_3.13.0.bb b/recipes-security/optee-qoriq/optee-os-qoriq_3.13.0.bb deleted file mode 100644 index 3c3652d3d..000000000 --- a/recipes-security/optee-qoriq/optee-os-qoriq_3.13.0.bb +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | require optee-os.nxp.inc | ||
| 2 | |||
| 3 | PV:append = "+git${SRCPV}" | ||
| 4 | |||
| 5 | PLATFORM_FLAVOR:ls1088ardb-pb = "ls1088ardb" | ||
| 6 | PLATFORM_FLAVOR:ls1046afrwy = "ls1046ardb" | ||
| 7 | PLATFORM_FLAVOR:lx2162aqds = "lx2160aqds" | ||
| 8 | |||
| 9 | EXTRA_OEMAKE += " \ | ||
| 10 | PLATFORM=ls \ | ||
| 11 | CFG_ARM64_core=y \ | ||
| 12 | " | ||
| 13 | |||
| 14 | do_compile:append:ls1012afrwy() { | ||
| 15 | mv ${B}/core/tee-raw.bin ${B}/core/tee_512mb.bin | ||
| 16 | oe_runmake CFG_DRAM0_SIZE=0x40000000 all | ||
| 17 | } | ||
| 18 | |||
| 19 | do_install:append:qoriq() { | ||
| 20 | install -m 644 ${B}/core/tee-raw.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}.bin | ||
| 21 | } | ||
| 22 | |||
| 23 | do_install:append:ls1012afrwy() { | ||
| 24 | install -m 644 ${B}/core/tee_512mb.bin ${D}${nonarch_base_libdir}/firmware/tee_${MACHINE}_512mb.bin | ||
| 25 | } | ||
| 26 | |||
| 27 | INHIBIT_PACKAGE_STRIP = "1" | ||
| 28 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-security/optee-qoriq/optee-os-qoriq_4.6.0.bb b/recipes-security/optee-qoriq/optee-os-qoriq_4.6.0.bb new file mode 100644 index 000000000..cd568b3dc --- /dev/null +++ b/recipes-security/optee-qoriq/optee-os-qoriq_4.6.0.bb | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | require optee-os.nxp.inc | ||
| 2 | |||
| 3 | OPTEE_OS_BRANCH = "lf-6.12.20_2.0.0" | ||
| 4 | SRCREV = "87964807d80baf1dcfd89cafc66de34a1cf16bf3" | ||
| 5 | |||
| 6 | do_install:append () { | ||
| 7 | install -d ${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 | ||
| 10 | |||
| 11 | # Install embedded TAs | ||
| 12 | install -d ${D}${base_libdir}/optee_armtz/ | ||
| 13 | install -m 444 ${B}/ta/*/*.ta ${D}${base_libdir}/optee_armtz/ | ||
| 14 | } | ||
| 15 | |||
| 16 | do_deploy:append () { | ||
| 17 | install -d ${DEPLOYDIR}/optee | ||
| 18 | install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/ | ||
| 19 | } | ||
| 20 | |||
| 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 5b90b937c..88ba3fbe2 100644 --- a/recipes-security/optee-qoriq/optee-os.nxp.inc +++ b/recipes-security/optee-qoriq/optee-os.nxp.inc | |||
| @@ -1,75 +1,30 @@ | |||
| 1 | # Copyright 2020-2021 NXP | 1 | # Copyright 2020-2021,2025 NXP |
| 2 | require recipes-security/optee-imx/optee-os-fslc.inc | ||
| 2 | 3 | ||
| 3 | SUMMARY = "OPTEE OS" | 4 | DEPENDS:append = " dtc-native" |
| 4 | DESCRIPTION = "OPTEE OS" | ||
| 5 | HOMEPAGE = "http://www.optee.org/" | ||
| 6 | LICENSE = "BSD" | ||
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173" | ||
| 8 | 5 | ||
| 9 | inherit deploy python3native autotools | 6 | # The patch same as imx-optee, so point FILESEXTRAPATHS to optee-imx/optee-client, |
| 10 | DEPENDS = "python3-pycryptodome-native python3-pyelftools-native python3-pycryptodomex-native dtc-native" | 7 | # avoid duplicate copy files to optee-qoriq |
| 8 | FILESEXTRAPATHS:prepend := "${THISDIR}/../optee-imx/optee-os:" | ||
| 11 | 9 | ||
| 12 | SRC_URI = "git://github.com/nxp-qoriq/optee_os.git;protocol=https;nobranch=1" | 10 | SRC_URI:remove = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https" |
| 13 | SRCREV = "735d98806dc26fbeeecad7f5e60ffeab8170c67e" | 11 | SRC_URI:prepend = "${OPTEE_OS_SRC};branch=${OPTEE_OS_BRANCH} " |
| 12 | SRC_URI:append = " file://0007-allow-setting-sysroot-for-clang.patch" | ||
| 14 | 13 | ||
| 15 | S = "${WORKDIR}/git" | 14 | OPTEE_OS_SRC ?= "git://github.com/nxp-qoriq/optee_os.git;protocol=https" |
| 16 | B = "${WORKDIR}/build.${PLATFORM_FLAVOR}" | ||
| 17 | 15 | ||
| 18 | PLATFORM_FLAVOR ?= "${MACHINE}" | 16 | REQUIRED_MACHINE_FEATURES = "optee" |
| 19 | 17 | ||
| 20 | OPTEE_ARCH ?= "arm64" | 18 | inherit features_check |
| 21 | OPTEE_ARCH:armv7a = "arm32" | ||
| 22 | OPTEE_ARCH:aarch64 = "arm64" | ||
| 23 | 19 | ||
| 24 | OPTEE_CORE_LOG_LEVEL ?= "1" | 20 | OPTEEMACHINE = "ls-${MACHINE}" |
| 25 | OPTEE_TA_LOG_LEVEL ?= "0" | 21 | OPTEEMACHINE:ls1088ardb-pb = "ls-ls1088ardb" |
| 22 | OPTEEMACHINE:ls1046afrwy = "ls-ls1046ardb" | ||
| 23 | OPTEEMACHINE:lx2162aqds = "ls-lx2160aqds" | ||
| 24 | OPTEEMACHINE:lx2160ardb-rev2 = "ls-lx2160ardb" | ||
| 26 | 25 | ||
| 27 | # Optee-os can be built for 32 bits and 64 bits at the same time | 26 | EXTRA_OEMAKE:append = " \ |
| 28 | # as long as the compilers are correctly defined. | 27 | CFG_TEE_TA_LOG_LEVEL=0 \ |
| 29 | # For 64bits, CROSS_COMPILE64 must be set | 28 | CFG_TEE_CORE_LOG_LEVEL=1 \ |
| 30 | # When defining CROSS_COMPILE and CROSS_COMPILE64, we assure that | ||
| 31 | # any 32 or 64 bits builds will pass | ||
| 32 | EXTRA_OEMAKE = " \ | ||
| 33 | -C ${S} O=${B} \ | ||
| 34 | PLATFORM_FLAVOR=${PLATFORM_FLAVOR} \ | ||
| 35 | CROSS_COMPILE=${HOST_PREFIX} \ | ||
| 36 | CROSS_COMPILE64=${HOST_PREFIX} \ | ||
| 37 | CFG_WERROR=y \ | ||
| 38 | CFG_TEE_CORE_LOG_LEVEL=${OPTEE_CORE_LOG_LEVEL} \ | ||
| 39 | CFG_TEE_TA_LOG_LEVEL=${OPTEE_TA_LOG_LEVEL} \ | ||
| 40 | " | 29 | " |
| 41 | 30 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | |
| 42 | do_compile() { | ||
| 43 | unset LDFLAGS | ||
| 44 | export CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_HOST}" | ||
| 45 | oe_runmake all | ||
| 46 | } | ||
| 47 | |||
| 48 | do_install() { | ||
| 49 | install -d ${D}${nonarch_base_libdir}/firmware/ | ||
| 50 | install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/ | ||
| 51 | |||
| 52 | # Install the TA devkit | ||
| 53 | install -d ${D}${includedir}/optee/export-user_ta/ | ||
| 54 | |||
| 55 | for f in ${B}/export-ta_${OPTEE_ARCH}/*; do | ||
| 56 | cp -aR $f ${D}${includedir}/optee/export-user_ta/ | ||
| 57 | done | ||
| 58 | |||
| 59 | install -d ${D}${nonarch_base_libdir}/optee_armtz | ||
| 60 | find ${B}/export-ta_${OPTEE_ARCH}/ta -name '*.ta' | while read name; do | ||
| 61 | install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ | ||
| 62 | done | ||
| 63 | } | ||
| 64 | |||
| 65 | do_deploy() { | ||
| 66 | install -d ${DEPLOYDIR}/optee | ||
| 67 | install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/optee/ | ||
| 68 | } | ||
| 69 | addtask deploy before do_build after do_install | ||
| 70 | |||
| 71 | FILES:${PN} = "${nonarch_base_libdir}/firmware/ ${nonarch_base_libdir}/optee_armtz/" | ||
| 72 | FILES:${PN}-staticdev = "/usr/include/optee/" | ||
| 73 | RDEPENDS:${PN}-dev += "${PN}-staticdev" | ||
| 74 | |||
| 75 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
diff --git a/recipes-security/optee-qoriq/optee-test-qoriq_3.13.0.bb b/recipes-security/optee-qoriq/optee-test-qoriq_3.13.0.bb deleted file mode 100644 index 69ef73d3a..000000000 --- a/recipes-security/optee-qoriq/optee-test-qoriq_3.13.0.bb +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | require optee-test.nxp.inc | ||
| 2 | |||
| 3 | PV:append = "+git${SRCPV}" | ||
| 4 | |||
| 5 | DEPENDS += "optee-client-qoriq optee-os-qoriq" | ||
| 6 | |||
| 7 | TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}" | ||
| 8 | |||
| 9 | EXTRA_OEMAKE += " \ | ||
| 10 | TEEC_EXPORT=${TEEC_EXPORT} \ | ||
| 11 | " | ||
| 12 | |||
| 13 | COMPATIBLE_MACHINE = "(qoriq-arm64)" | ||
diff --git a/recipes-security/optee-qoriq/optee-test-qoriq_4.6.0.bb b/recipes-security/optee-qoriq/optee-test-qoriq_4.6.0.bb new file mode 100644 index 000000000..d008a6211 --- /dev/null +++ b/recipes-security/optee-qoriq/optee-test-qoriq_4.6.0.bb | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | require optee-test.nxp.inc | ||
| 2 | |||
| 3 | # The BSD and GPL license files are now included in the source | ||
| 4 | # https://github.com/OP-TEE/optee_test/commit/a748f5fcd9ec8a574dc86a5aa56d05bc6ac174e7 | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=a8fa504109e4cd7ea575bc49ea4be560 \ | ||
| 6 | file://LICENSE-BSD;md5=dca16d6efa93b55d0fd662ae5cd6feeb \ | ||
| 7 | file://LICENSE-GPL;md5=10e86b5d2a6cb0e2b9dcfdd26a9ac58d" | ||
| 8 | |||
| 9 | OPTEE_TEST_BRANCH = "lf-6.12.20_2.0.0" | ||
| 10 | SRCREV = "010f088f05b5ebf392c6e235d6e53d391755722f" | ||
diff --git a/recipes-security/optee-qoriq/optee-test.nxp.inc b/recipes-security/optee-qoriq/optee-test.nxp.inc index 14a42ac5a..48d5a4211 100644 --- a/recipes-security/optee-qoriq/optee-test.nxp.inc +++ b/recipes-security/optee-qoriq/optee-test.nxp.inc | |||
| @@ -1,61 +1,15 @@ | |||
| 1 | # Copyright 2020-2021 NXP | 1 | # Copyright 2020-2021,2025 NXP |
| 2 | require recipes-security/optee-imx/optee-test-fslc.inc | ||
| 2 | 3 | ||
| 3 | SUMMARY = "OPTEE test" | 4 | DEPENDS:remove = "optee-client optee-os-tadevkit" |
| 4 | HOMEPAGE = "http://www.optee.org/" | 5 | DEPENDS:append = "optee-client-qoriq optee-os-qoriq-tadevkit openssl" |
| 5 | 6 | ||
| 6 | LICENSE = "BSD & GPL-2.0-only" | 7 | SRC_URI:remove = "git://github.com/OP-TEE/optee_test.git;branch=master;protocol=https" |
| 7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=daa2bcccc666345ab8940aab1315a4fa" | 8 | SRC_URI:remove = "file://run-ptest" |
| 9 | SRC_URI:prepend = "${OPTEE_TEST_SRC};branch=${OPTEE_TEST_BRANCH} " | ||
| 8 | 10 | ||
| 9 | DEPENDS = "python3-pycryptodome-native python3-pycryptodomex-native openssl" | 11 | OPTEE_TEST_SRC ?= "git://github.com/nxp-qoriq/optee_test.git;protocol=https" |
| 10 | inherit python3native cmake | ||
| 11 | 12 | ||
| 12 | SRC_URI = "git://github.com/nxp-qoriq/optee_test.git;protocol=https;nobranch=1" | 13 | CFLAGS += " -Wno-error=unterminated-string-initialization" |
| 13 | SRCREV = "69722dab8c1f2683e30e0ee3b536053367e37aad" | ||
| 14 | 14 | ||
| 15 | S = "${WORKDIR}/git" | 15 | COMPATIBLE_MACHINE = "(qoriq-arm64)" |
| 16 | B = "${WORKDIR}/build" | ||
| 17 | |||
| 18 | TA_DEV_KIT_DIR ?= "${STAGING_INCDIR}/optee/export-user_ta" | ||
| 19 | OPTEE_CLIENT_EXPORT ?= "${STAGING_DIR_HOST}${prefix}" | ||
| 20 | |||
| 21 | EXTRA_OEMAKE = " \ | ||
| 22 | TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \ | ||
| 23 | OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \ | ||
| 24 | CROSS_COMPILE_HOST=${HOST_PREFIX} \ | ||
| 25 | CROSS_COMPILE_TA=${HOST_PREFIX} \ | ||
| 26 | OPTEE_OPENSSL_EXPORT=${STAGING_INCDIR}/ \ | ||
| 27 | -C ${S} O=${B} \ | ||
| 28 | " | ||
| 29 | |||
| 30 | EXTRA_OECMAKE = " \ | ||
| 31 | -DOPTEE_TEST_SDK=${TA_DEV_KIT_DIR} \ | ||
| 32 | " | ||
| 33 | |||
| 34 | do_compile() { | ||
| 35 | export CXXFLAGS="${CXXFLAGS} --sysroot=${STAGING_DIR_HOST}" | ||
| 36 | oe_runmake xtest | ||
| 37 | oe_runmake ta | ||
| 38 | oe_runmake test_plugin | ||
| 39 | } | ||
| 40 | |||
| 41 | do_install() { | ||
| 42 | install -d ${D}${bindir}/ | ||
| 43 | install ${B}/xtest/xtest ${D}${bindir}/ | ||
| 44 | |||
| 45 | install -d ${D}${nonarch_base_libdir}/optee_armtz | ||
| 46 | find ${B}/ta -name '*.ta' | while read name; do | ||
| 47 | install -m 444 $name ${D}${nonarch_base_libdir}/optee_armtz/ | ||
| 48 | done | ||
| 49 | |||
| 50 | install -d ${D}${libdir}/tee-supplicant/plugins/ | ||
| 51 | find ${B}/supp_plugin -name '*.plugin' | while read name; do | ||
| 52 | install -m 755 $name ${D}${libdir}/tee-supplicant/plugins/ | ||
| 53 | done | ||
| 54 | } | ||
| 55 | |||
| 56 | FILES:${PN} += "${nonarch_base_libdir} ${libdir}/tee-supplicant/plugins/" | ||
| 57 | |||
| 58 | DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations" | ||
| 59 | FULL_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized -Wno-deprecated-declarations" | ||
| 60 | |||
| 61 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
diff --git a/recipes-security/smw/keyctl-caam_git.bb b/recipes-security/smw/keyctl-caam_git.bb index 25a5f656a..f147e1148 100644 --- a/recipes-security/smw/keyctl-caam_git.bb +++ b/recipes-security/smw/keyctl-caam_git.bb | |||
| @@ -11,13 +11,11 @@ SRC_URI = "git://github.com/nxp-imx/keyctl_caam.git;protocol=https;branch=${SRCB | |||
| 11 | 11 | ||
| 12 | SRCREV = "81dc06cdb9c4d0d4ba10459d85af9a8603774948" | 12 | SRCREV = "81dc06cdb9c4d0d4ba10459d85af9a8603774948" |
| 13 | 13 | ||
| 14 | S = "${WORKDIR}/git" | ||
| 15 | |||
| 16 | TARGET_CC_ARCH += "${LDFLAGS}" | 14 | TARGET_CC_ARCH += "${LDFLAGS}" |
| 17 | 15 | ||
| 18 | do_install () { | 16 | do_install () { |
| 19 | oe_runmake DESTDIR=${D} install | 17 | oe_runmake DESTDIR=${D} install |
| 20 | } | 18 | } |
| 21 | 19 | ||
| 22 | COMPATIBLE_MACHINE = "(imx-generic-bsp)" | 20 | COMPATIBLE_MACHINE = "(imx-generic-bsp|qoriq)" |
| 23 | 21 | ||
diff --git a/recipes-security/smw/smw_git.bb b/recipes-security/smw/smw_git.bb index 3c1d04908..dbb59d2f3 100644 --- a/recipes-security/smw/smw_git.bb +++ b/recipes-security/smw/smw_git.bb | |||
| @@ -19,7 +19,7 @@ SRC_URI = "git://github.com/nxp-imx/imx-smw.git;protocol=https;branch=release/ve | |||
| 19 | SRCREV_smw = "f0570b3e8cb5f68d54edc4f9dd7cb984f6f604ed" | 19 | SRCREV_smw = "f0570b3e8cb5f68d54edc4f9dd7cb984f6f604ed" |
| 20 | SRCREV_psa = "463cb95ada820bc6f758d50066cf8c0ed5cc3a02" | 20 | SRCREV_psa = "463cb95ada820bc6f758d50066cf8c0ed5cc3a02" |
| 21 | SRCREV_FORMAT = "smw_psa" | 21 | SRCREV_FORMAT = "smw_psa" |
| 22 | S = "${WORKDIR}/git/smw" | 22 | S = "${UNPACKDIR}/git/smw" |
| 23 | 23 | ||
| 24 | inherit cmake python3native | 24 | inherit cmake python3native |
| 25 | 25 | ||
