Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Clément Léger via buildroot" <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: "Etienne Carriere" <etienne.carriere@linaro.org>,
	"Clément Léger" <clement.leger@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH v2 2/7] boot/optee-os: add support to build with python-cryptography
Date: Thu, 10 Mar 2022 17:57:30 +0100	[thread overview]
Message-ID: <20220310165735.1102802-3-clement.leger@bootlin.com> (raw)
In-Reply-To: <20220310165735.1102802-1-clement.leger@bootlin.com>

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.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
---
 boot/optee-os/Config.in   | 8 ++++++++
 boot/optee-os/optee-os.mk | 7 ++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/boot/optee-os/Config.in b/boot/optee-os/Config.in
index 0974578484..f8426f9ab2 100644
--- a/boot/optee-os/Config.in
+++ b/boot/optee-os/Config.in
@@ -48,6 +48,14 @@ config BR2_TARGET_OPTEE_OS_CUSTOM_REPO_VERSION
 
 endif
 
+config BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY
+	bool "optee-os needs host-python-cryptography to build"
+	help
+	  OP-TEE 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_VERSION
 	string
 	default "3.15.0"	if BR2_TARGET_OPTEE_OS_LATEST
diff --git a/boot/optee-os/optee-os.mk b/boot/optee-os/optee-os.mk
index 166b5e693c..57f9a17bb6 100644
--- a/boot/optee-os/optee-os.mk
+++ b/boot/optee-os/optee-os.mk
@@ -21,7 +21,12 @@ 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
 
 # On 64bit targets, OP-TEE OS can be built in 32bit mode, or
 # can be built in 64bit mode and support 32bit and 64bit
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2022-03-10 17:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 16:57 [Buildroot] [PATCH v2 0/7] boot/optee-os: support new optee-os 3.16.0 build dependencies Clément Léger via buildroot
2022-03-10 16:57 ` [Buildroot] [PATCH v2 1/7] package/python-cryptography: enable host package Clément Léger via buildroot
2022-03-10 16:57 ` Clément Léger via buildroot [this message]
2022-03-10 16:57 ` [Buildroot] [PATCH v2 3/7] boot/optee-os: bump to version 3.16.0 Clément Léger via buildroot
2022-03-10 16:57 ` [Buildroot] [PATCH v2 4/7] package/optee-test: " Clément Léger via buildroot
2022-03-10 16:57 ` [Buildroot] [PATCH v2 5/7] package/optee-examples: " Clément Léger via buildroot
2022-03-10 16:57 ` [Buildroot] [PATCH v2 6/7] package/optee-client: " Clément Léger via buildroot
2022-03-10 16:57 ` [Buildroot] [PATCH v2 7/7] package/optee-benchmark: " Clément Léger via buildroot
2022-03-11  9:32 ` [Buildroot] [PATCH v2 0/7] boot/optee-os: support new optee-os 3.16.0 build dependencies Clément Léger via buildroot
2022-03-11 10:14   ` Etienne Carriere

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220310165735.1102802-3-clement.leger@bootlin.com \
    --to=buildroot@buildroot.org \
    --cc=clement.leger@bootlin.com \
    --cc=etienne.carriere@linaro.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox