From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Subject: [ptxdist] [PATCH v2 3/5] optee: add the OP-TEE as new target package
Date: Wed, 13 Feb 2019 08:25:14 +0100 [thread overview]
Message-ID: <d9843b7d025f68cc187d2ce4a5d7b594113b64ab.1550042684.git-series.r.czerwinski@pengutronix.de> (raw)
In-Reply-To: <cover.6495606559e48be9e838d9789bb35b35c129a108.1550042684.git-series.r.czerwinski@pengutronix.de>
Provide two KConfig files to allow inclusion of OP-TEE for userspace libraries
and applications.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
platforms/optee.in | 41 +++++++++++++++++++-
rules/optee.in | 4 ++-
rules/optee.make | 99 ++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 144 insertions(+)
create mode 100644 platforms/optee.in
create mode 100644 rules/optee.in
create mode 100644 rules/optee.make
diff --git a/platforms/optee.in b/platforms/optee.in
new file mode 100644
index 0000000..d88e435
--- /dev/null
+++ b/platforms/optee.in
@@ -0,0 +1,41 @@
+## SECTION=bootloader
+
+menuconfig OPTEE
+ select BOOTLOADER
+ prompt "OPTEE"
+ bool
+ depends on ARCH_ARM || ARCH_ARM64
+ depends on !ARCH_ARM64 || BROKEN
+ help
+ OP-TEE is an open source project which contains a full implementation
+ to make up a complete Trusted Execution Environment. The project has
+ roots in a proprietary solution, initially created by ST-Ericsson and
+ then owned and maintained by STMicroelectronics. In 2014, Linaro
+ started working with STMicroelectronics to transform the proprietary
+ TEE solution into an open source TEE solution instead.
+
+if OPTEE
+
+config OPTEE_PLATFORM
+ string
+ prompt "OPTEE Platform"
+ help
+ Platform to use for OP-TEE.
+ i.e. imx for the NXP imx platform or vexpress for versatile express
+ platforms.
+
+config OPTEE_PLATFORM_FLAVOUR
+ string
+ prompt "OPTEE Platform Flavour"
+ help
+ Platform Flavour for the selected platform, i.e. mx6qsabresd for the
+ imx platform.
+
+config OPTEE_CFG
+ string
+ prompt "OP-TEE CFG Flags"
+ help
+ Refer to the following file for the CFG_FLAGS:
+ https://github.com/OP-TEE/optee_os/blob/master/mk/config.mk
+
+endif
diff --git a/rules/optee.in b/rules/optee.in
new file mode 100644
index 0000000..49bc6c9
--- /dev/null
+++ b/rules/optee.in
@@ -0,0 +1,4 @@
+## SECTION=security
+
+config OPTEE
+ tristate
diff --git a/rules/optee.make b/rules/optee.make
new file mode 100644
index 0000000..e4dc9ab
--- /dev/null
+++ b/rules/optee.make
@@ -0,0 +1,99 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Rouven Czerwinski <rouven@czerwinskis.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_OPTEE) += optee
+
+#
+# Paths and names
+#
+OPTEE_VERSION := 3.4.0
+OPTEE_MD5 := d0644c0f57124f183034e5fd7b26513e
+OPTEE := optee-$(OPTEE_VERSION)
+OPTEE_SUFFIX := tar.gz
+OPTEE_URL := https://github.com/OP-TEE/optee_os/archive/$(OPTEE_VERSION).$(OPTEE_SUFFIX)
+OPTEE_SOURCE := $(SRCDIR)/$(OPTEE).$(OPTEE_SUFFIX)
+OPTEE_DIR := $(BUILDDIR)/$(OPTEE)
+OPTEE_LICENSE := BSD-2-Clause AND BSD-3-Clause
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+OPTEE_WRAPPER_BLACKLIST := \
+ TARGET_HARDEN_RELRO \
+ TARGET_HARDEN_BINDNOW \
+ TARGET_HARDEN_PIE \
+ TARGET_DEBUG \
+ TARGET_BUILD_ID
+
+OPTEE_CONF_TOOL := NO
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+OPTEE_MAKE_OPT += $(call ptx/ifdef,PTXCONF_ARCH_ARM64,CFG_ARM64_core=y)
+
+OPTEE_MAKE_OPT += PLATFORM=$(call remove_quotes,$(PTXCONF_OPTEE_PLATFORM))-$(call remove_quotes,$(PTXCONF_OPTEE_PLATFORM_FLAVOUR))
+OPTEE_MAKE_OPT += $(call remove_quotes,$(PTXCONF_OPTEE_CFG))
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+OPTEE_LIB_DIR := \
+ $(call ptx/ifdef,PTXCONF_ARCH_ARM64,export-ta_arm64,export-ta_arm32)
+
+OPTEE_OUT_DIR := \
+ $(OPTEE_DIR)/out/arm-plat-$(PTXCONF_OPTEE_PLATFORM)
+
+$(STATEDIR)/optee.install:
+ @$(call targetinfo)
+
+ @$(call install_init, optee)
+ @install -d -m755 $(OPTEE_PKGDIR)/usr/lib/optee-os
+ @cp -r $(OPTEE_OUT_DIR)/$(OPTEE_LIB_DIR)/* $(OPTEE_PKGDIR)/usr/lib/optee-os
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+OPTEE_BINARIES := \
+ tee.bin \
+ tee-header_v2.bin \
+ tee-pager_v2.bin \
+ tee-pageable_v2.bin \
+ tee.elf
+
+$(STATEDIR)/optee.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, optee)
+ @$(foreach binary, $(OPTEE_BINARIES), \
+ install -D -m644 $(OPTEE_OUT_DIR)/core/$(binary) $(IMAGEDIR)/$(binary);)
+
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/optee.clean:
+ @$(call targetinfo)
+ @$(foreach binary, $(OPTEE_BINARIES), \
+ rm -f $(IMAGEDIR)/$(binary);)
+ @$(call clean_pkg, OPTEE)
+
+# vim: syntax=make
--
git-series 0.9.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2019-02-13 7:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-13 7:25 [ptxdist] [PATCH v2 0/5] Support for OP-TEE (Open Portable Trusted Execution Environment) Rouven Czerwinski
2019-02-13 7:25 ` [ptxdist] [PATCH v2 1/5] optee-client: bump to 3.4.0 Rouven Czerwinski
2019-02-13 7:25 ` [ptxdist] [PATCH v2 2/5] optee-client: add tee-supplicant service file Rouven Czerwinski
2019-02-13 7:25 ` Rouven Czerwinski [this message]
2019-02-13 7:25 ` [ptxdist] [PATCH v2 4/5] optee-test: add new optee-test target package Rouven Czerwinski
2019-02-13 7:25 ` [ptxdist] [PATCH v2 5/5] optee-examples: add as new " Rouven Czerwinski
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=d9843b7d025f68cc187d2ce4a5d7b594113b64ab.1550042684.git-series.r.czerwinski@pengutronix.de \
--to=r.czerwinski@pengutronix.de \
--cc=ptxdist@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