mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Robin van der Gracht <robin@protonic.nl>
To: ptxdist@pengutronix.de
Cc: Robin van der Gracht <robin@protonic.nl>,
	Michael Olbrich <m.olbrich@pengutronix.de>,
	Rouven Czerwinski <r.czerwinski@pengutronix.de>
Subject: [ptxdist] [PATCH v2 2/2] optee-client: Make RPMB emulation configurable
Date: Thu, 17 Dec 2020 09:30:26 +0100	[thread overview]
Message-ID: <20201217083026.851806-1-robin@protonic.nl> (raw)
In-Reply-To: <20201217081519.850534-1-robin@protonic.nl>

Enabled by default for backwards compatibility.
The added patch was pulled from the optee-client git repository. It will
be included in the next optee-client release.

Signed-off-by: Robin van der Gracht <robin@protonic.nl>
---

v2: Added the missing optee-client.in changes.

 ...ake-RPMB_EMU-a-conditional-assignmen.patch | 36 +++++++++++++++++++
 rules/optee-client.in                         |  5 +++
 rules/optee-client.make                       |  1 +
 3 files changed, 42 insertions(+)
 create mode 100644 patches/optee-client-3.11.0/0001-tee-supplicant-make-RPMB_EMU-a-conditional-assignmen.patch

diff --git a/patches/optee-client-3.11.0/0001-tee-supplicant-make-RPMB_EMU-a-conditional-assignmen.patch b/patches/optee-client-3.11.0/0001-tee-supplicant-make-RPMB_EMU-a-conditional-assignmen.patch
new file mode 100644
index 000000000..cf1a12703
--- /dev/null
+++ b/patches/optee-client-3.11.0/0001-tee-supplicant-make-RPMB_EMU-a-conditional-assignmen.patch
@@ -0,0 +1,36 @@
+From a0d685745ae00bfc275c27a07565f490de48b5e2 Mon Sep 17 00:00:00 2001
+From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
+Date: Mon, 19 Oct 2020 14:29:24 +0300
+Subject: [PATCH] tee-supplicant: make RPMB_EMU a conditional assignment
+
+At the moment the RPMB_EMU variable in the Makefile uses a simple
+assignment and unconditionally sets the variable.
+Move it to a conditional assignment and allow users to override it
+from the command line with:
+CROSS_COMPILE=aarch64-linux-gnu- RPMB_EMU=0 make
+
+Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
+Reviewed-by: Jerome Forissier <jerome@forissier.org>
+Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
+---
+ tee-supplicant/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tee-supplicant/Makefile b/tee-supplicant/Makefile
+index b7cf39a..fa26154 100644
+--- a/tee-supplicant/Makefile
++++ b/tee-supplicant/Makefile
+@@ -3,8 +3,8 @@ include ../config.mk
+ 
+ OUT_DIR := $(OO)/tee-supplicant
+ 
+-# Emulate RPMB ioctl's
+-RPMB_EMU	:= 1
++# Emulate RPMB ioctl's by default
++RPMB_EMU	?= 1
+ 
+ .PHONY: all tee-supplicant clean
+ 
+-- 
+2.25.1
+
diff --git a/rules/optee-client.in b/rules/optee-client.in
index be97b3689..dbde5656d 100644
--- a/rules/optee-client.in
+++ b/rules/optee-client.in
@@ -20,4 +20,9 @@ config OPTEE_CLIENT_SYSTEMD_UNIT
 	depends on SYSTEMD
 	prompt "install systemd service file for tee-supplicant"
 
+config OPTEE_CLIENT_RPMB_EMU
+        bool
+        default y
+        prompt "Emulate RPMB device for testing"
+
 endif
diff --git a/rules/optee-client.make b/rules/optee-client.make
index dc76773c7..85ea30cc9 100644
--- a/rules/optee-client.make
+++ b/rules/optee-client.make
@@ -32,6 +32,7 @@ OPTEE_CLIENT_MAKE_ENV := \
 	$(CROSS_ENV) \
 	LIBDIR=/usr/lib \
 	INCLUDEDIR=/usr/include \
+	RPMB_EMU=$(call ptx/ifdef, PTXCONF_OPTEE_CLIENT_RPMB_EMU, 1, 0) \
 	CFG_TEE_CLIENT_LOAD_PATH=/usr/lib/
 
 # ----------------------------------------------------------------------------
-- 
2.25.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

  reply	other threads:[~2020-12-17  8:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17  8:15 [ptxdist] [PATCH " Robin van der Gracht
2020-12-17  8:30 ` Robin van der Gracht [this message]
2021-01-08  9:03   ` [ptxdist] [PATCH v2 " Michael Olbrich

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=20201217083026.851806-1-robin@protonic.nl \
    --to=robin@protonic.nl \
    --cc=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    --cc=r.czerwinski@pengutronix.de \
    /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