From 752f478affb5eba6364f44abccdb77ad60e5f000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20L=C3=A9ger?= Date: Fri, 18 Mar 2022 14:24:22 +0100 Subject: [PATCH] boot/optee-os: add support to build with python-cryptography MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Newer version of optee-os (>= 3.16) uses python-cryptography instead of python-pycryptodomex in python scripts. Add support to build these newer versions by adding a new BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY option which will select host-python-cryptography dependency when building optee-os. Acked-by: Etienne Carriere Signed-off-by: Clément Léger [yann.morin.1998@free.fr: - move the _ARCH_DEPENDS option from the main symbol to thus new symbol ] Signed-off-by: Yann E. MORIN --- boot/optee-os/Config.in | 9 +++++++++ boot/optee-os/optee-os.mk | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/boot/optee-os/Config.in b/boot/optee-os/Config.in index ea16550b72..b998228121 100644 --- a/boot/optee-os/Config.in +++ b/boot/optee-os/Config.in @@ -61,6 +61,15 @@ config BR2_TARGET_OPTEE_OS_NEEDS_DTC Select this option if your OP-TEE OS platform configuration requires the Device Tree compiler to be available. +config BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY + bool "OP-TEE OS needs host-python-cryptography" + depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS + help + OP-TEE OS version below 3.16 used python-pycryptodomex + package in python scripts. Newer version uses + python-cryptography. Select this option if optee-os needs + python-cryptography to be built. + config BR2_TARGET_OPTEE_OS_CORE bool "Build core" default y diff --git a/boot/optee-os/optee-os.mk b/boot/optee-os/optee-os.mk index 9f76d8450e..5313a1badc 100644 --- a/boot/optee-os/optee-os.mk +++ b/boot/optee-os/optee-os.mk @@ -21,7 +21,13 @@ else OPTEE_OS_SITE = $(call github,OP-TEE,optee_os,$(OPTEE_OS_VERSION)) endif -OPTEE_OS_DEPENDENCIES = host-openssl host-python3 host-python-pycryptodomex host-python-pyelftools +OPTEE_OS_DEPENDENCIES = host-openssl host-python3 host-python-pyelftools + +ifeq ($(BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY),y) +OPTEE_OS_DEPENDENCIES += host-python-cryptography +else +OPTEE_OS_DEPENDENCIES += host-python-pycryptodomex +endif ifeq ($(BR2_TARGET_OPTEE_OS_NEEDS_DTC),y) OPTEE_OS_DEPENDENCIES += host-dtc