* [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location
@ 2019-03-01 16:47 Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 2/9] package/optee-test: locate TA SDK though optee-os package Etienne Carriere
` (8 more replies)
0 siblings, 9 replies; 14+ messages in thread
From: Etienne Carriere @ 2019-03-01 16:47 UTC (permalink / raw)
To: buildroot
Makefile script for boot package optee-os produces make variable
OPTEE_OS_STAGING_SDK to locate the Trusted Application SDK expected
by other packages when building OP-TEE trusted applications.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
boot/optee-os/optee-os.mk | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/boot/optee-os/optee-os.mk b/boot/optee-os/optee-os.mk
index aeac067..df481c9 100644
--- a/boot/optee-os/optee-os.mk
+++ b/boot/optee-os/optee-os.mk
@@ -55,9 +55,11 @@ OPTEE_OS_MAKE_OPTS += $(call qstrip,$(BR2_TARGET_OPTEE_OS_ADDITIONAL_VARIABLES))
OPTEE_OS_BUILDDIR_OUT = out
ifeq ($(BR2_aarch64),y)
OPTEE_OS_LOCAL_SDK = $(OPTEE_OS_BUILDDIR_OUT)/export-ta_arm64
+OPTEE_OS_STAGING_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm64
endif
ifeq ($(BR2_arm),y)
OPTEE_OS_LOCAL_SDK = $(OPTEE_OS_BUILDDIR_OUT)/export-ta_arm32
+OPTEE_OS_STAGING_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm32
endif
ifeq ($(BR2_TARGET_OPTEE_OS_CORE),y)
@@ -86,8 +88,8 @@ define OPTEE_OS_BUILD_SDK
$(TARGET_CONFIGURE_OPTS) $(OPTEE_OS_MAKE_OPTS) ta_dev_kit
endef
define OPTEE_OS_INSTALL_STAGING_CMDS
- mkdir -p $(STAGING_DIR)/lib/optee
- cp -ardpf $(@D)/$(OPTEE_OS_LOCAL_SDK) $(STAGING_DIR)/lib/optee
+ mkdir -p $(OPTEE_OS_STAGING_SDK)
+ cp -ardpf $(@D)/$(OPTEE_OS_LOCAL_SDK)/* $(OPTEE_OS_STAGING_SDK)
endef
endif # BR2_TARGET_OPTEE_OS_SDK
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 2/9] package/optee-test: locate TA SDK though optee-os package
2019-03-01 16:47 [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Etienne Carriere
@ 2019-03-01 16:47 ` Etienne Carriere
2019-03-05 22:25 ` Thomas Petazzoni
2019-03-01 16:47 ` [Buildroot] [PATCH/next 3/9] package/optee-examples: " Etienne Carriere
` (7 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Etienne Carriere @ 2019-03-01 16:47 UTC (permalink / raw)
To: buildroot
Package optee-os was recently changed to produce variable
OPTEE_OS_STAGING_SDK to other packages to locate the OP-TEE Trusted
Application SDK generated from optee-os package and installed in
the Buildroot output staging directory.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
package/optee-test/optee-test.mk | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/package/optee-test/optee-test.mk b/package/optee-test/optee-test.mk
index 1ab6bf4..687347d 100644
--- a/package/optee-test/optee-test.mk
+++ b/package/optee-test/optee-test.mk
@@ -11,12 +11,7 @@ OPTEE_TEST_LICENSE_FILES = LICENSE.md
OPTEE_TEST_DEPENDENCIES = optee-client optee-os
-ifeq ($(BR2_aarch64),y)
-OPTEE_TEST_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm64
-else ifeq ($(BR2_arm),y)
-OPTEE_TEST_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm32
-endif
-OPTEE_TEST_CONF_OPTS = -DOPTEE_TEST_SDK=$(OPTEE_TEST_SDK)
+OPTEE_TEST_CONF_OPTS = -DOPTEE_TEST_SDK=$(OPTEE_OS_STAGING_SDK)
# Trusted Application are not built from CMake due to ta_dev_kit
# dependencies. We must build and install them on target.
@@ -24,7 +19,7 @@ define OPTEE_TEST_BUILD_TAS
$(foreach f,$(wildcard $(@D)/ta/*/Makefile), \
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
- TA_DEV_KIT_DIR=$(OPTEE_TEST_SDK) \
+ TA_DEV_KIT_DIR=$(OPTEE_OS_STAGING_SDK) \
-C $(dir $f) all
)
endef
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 3/9] package/optee-examples: locate TA SDK though optee-os package
2019-03-01 16:47 [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 2/9] package/optee-test: locate TA SDK though optee-os package Etienne Carriere
@ 2019-03-01 16:47 ` Etienne Carriere
2019-03-05 22:25 ` Thomas Petazzoni
2019-03-01 16:47 ` [Buildroot] [PATCH/next 4/9] package/optee-client: fix build warnings 3.4.0 Etienne Carriere
` (6 subsequent siblings)
8 siblings, 1 reply; 14+ messages in thread
From: Etienne Carriere @ 2019-03-01 16:47 UTC (permalink / raw)
To: buildroot
Package optee-os was recently changed to produce variable
OPTEE_OS_STAGING_SDK to other packages to locate the OP-TEE Trusted
Application SDK generated from optee-os package and installed in
the Buildroot output staging directory.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
package/optee-examples/optee-examples.mk | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/package/optee-examples/optee-examples.mk b/package/optee-examples/optee-examples.mk
index 10fe62b..1f5548d 100644
--- a/package/optee-examples/optee-examples.mk
+++ b/package/optee-examples/optee-examples.mk
@@ -11,19 +11,13 @@ OPTEE_EXAMPLES_LICENSE_FILES = LICENSE
OPTEE_EXAMPLES_DEPENDENCIES = optee-client optee-os
-ifeq ($(BR2_aarch64),y)
-OPTEE_EXAMPLES_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm64
-else ifeq ($(BR2_arm),y)
-OPTEE_EXAMPLES_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm32
-endif
-
# Trusted Application are not built from CMake due to ta_dev_kit dependencies.
# We must build and install them on target.
define OPTEE_EXAMPLES_BUILD_TAS
$(foreach f,$(wildcard $(@D)/*/ta/Makefile), \
$(TARGET_CONFIGURE_OPTS) \
$(MAKE) CROSS_COMPILE=$(TARGET_CROSS) \
- TA_DEV_KIT_DIR=$(OPTEE_EXAMPLES_SDK) \
+ TA_DEV_KIT_DIR=$(OPTEE_OS_STAGING_SDK) \
O=out -C $(dir $f) all
)
endef
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 4/9] package/optee-client: fix build warnings 3.4.0
2019-03-01 16:47 [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 2/9] package/optee-test: locate TA SDK though optee-os package Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 3/9] package/optee-examples: " Etienne Carriere
@ 2019-03-01 16:47 ` Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 5/9] package/optee-client: support BUILD_STATIC_LIBS Etienne Carriere
` (5 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Etienne Carriere @ 2019-03-01 16:47 UTC (permalink / raw)
To: buildroot
And a patch for optee-client package currently synced with tag 3.4.0
which contains source issues to be fixed.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
.../0001-libteec-fix-build-warnings.patch | 65 ++++++++++++++++++++++
1 file changed, 65 insertions(+)
create mode 100644 package/optee-client/0001-libteec-fix-build-warnings.patch
diff --git a/package/optee-client/0001-libteec-fix-build-warnings.patch b/package/optee-client/0001-libteec-fix-build-warnings.patch
new file mode 100644
index 0000000..21f47ec
--- /dev/null
+++ b/package/optee-client/0001-libteec-fix-build-warnings.patch
@@ -0,0 +1,65 @@
+From 657414ccd20b4fb2985efd83b0679964fec923c2 Mon Sep 17 00:00:00 2001
+From: Etienne Carriere <etienne.carriere@linaro.org>
+Date: Fri, 1 Mar 2019 09:36:46 +0100
+Subject: [PATCH] libteec: fix build warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fix build warnings reported by the Buildroot team [1]:
+
+/home/thomas/projets/outputs/armv5-ctng-linux-gnueabi/build/optee-client-3.4.0/libteec/src/tee_client_api.c: In function 'TEEC_InitializeContext':
+/home/thomas/projets/outputs/armv5-ctng-linux-gnueabi/build/optee-client-3.4.0/libteec/src/tee_client_api.c:149:28: error: 'gen_caps' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+ ctx->reg_mem = gen_caps & TEE_GEN_CAP_REG_MEM;
+ ^
+/home/thomas/projets/buildroot/output/build/optee-client-3.4.0/libteec/src/tee_client_api.c: In function ?TEEC_OpenSession?:
+/home/thomas/projets/buildroot/output/build/optee-client-3.4.0/libteec/src/tee_client_api.c:507:8: error: cast increases required alignment of target type [-Werror=cast-align]
+ arg = (struct tee_ioctl_open_session_arg *)buf;
+ ^
+/home/thomas/projets/buildroot/output/build/optee-client-3.4.0/libteec/src/tee_client_api.c: In function ?TEEC_InvokeCommand?:
+/home/thomas/projets/buildroot/output/build/optee-client-3.4.0/libteec/src/tee_client_api.c:581:8: error: cast increases required alignment of target type [-Werror=cast-align]
+ arg = (struct tee_ioctl_invoke_arg *)buf;
+ ^
+
+[1] http://lists.busybox.net/pipermail/buildroot/2019-February/243437.html
+
+Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
+---
+ libteec/src/tee_client_api.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libteec/src/tee_client_api.c b/libteec/src/tee_client_api.c
+index 698092b..a8683fd 100644
+--- a/libteec/src/tee_client_api.c
++++ b/libteec/src/tee_client_api.c
+@@ -140,7 +140,7 @@ TEEC_Result TEEC_InitializeContext(const char *name, TEEC_Context *ctx)
+ return TEEC_ERROR_BAD_PARAMETERS;
+
+ for (n = 0; n < TEEC_MAX_DEV_SEQ; n++) {
+- uint32_t gen_caps;
++ uint32_t gen_caps = 0;
+
+ snprintf(devname, sizeof(devname), "/dev/tee%zu", n);
+ fd = teec_open_dev(devname, name, &gen_caps);
+@@ -504,7 +504,7 @@ TEEC_Result TEEC_OpenSession(TEEC_Context *ctx, TEEC_Session *session,
+ buf_data.buf_ptr = (uintptr_t)buf;
+ buf_data.buf_len = sizeof(buf);
+
+- arg = (struct tee_ioctl_open_session_arg *)buf;
++ arg = (struct tee_ioctl_open_session_arg *)(void *)buf;
+ arg->num_params = TEEC_CONFIG_PAYLOAD_REF_COUNT;
+ params = (struct tee_ioctl_param *)(arg + 1);
+
+@@ -578,7 +578,7 @@ TEEC_Result TEEC_InvokeCommand(TEEC_Session *session, uint32_t cmd_id,
+ buf_data.buf_ptr = (uintptr_t)buf;
+ buf_data.buf_len = sizeof(buf);
+
+- arg = (struct tee_ioctl_invoke_arg *)buf;
++ arg = (struct tee_ioctl_invoke_arg *)(void *)buf;
+ arg->num_params = TEEC_CONFIG_PAYLOAD_REF_COUNT;
+ params = (struct tee_ioctl_param *)(arg + 1);
+
+--
+1.9.1
+
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 5/9] package/optee-client: support BUILD_STATIC_LIBS
2019-03-01 16:47 [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Etienne Carriere
` (2 preceding siblings ...)
2019-03-01 16:47 ` [Buildroot] [PATCH/next 4/9] package/optee-client: fix build warnings 3.4.0 Etienne Carriere
@ 2019-03-01 16:47 ` Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 6/9] package/optee-test: drop constraint on !BR2_STATIC_LIBS Etienne Carriere
` (4 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Etienne Carriere @ 2019-03-01 16:47 UTC (permalink / raw)
To: buildroot
Patch optee-client from release 3.4.0 to support building resources
with static linkage of executable binaries with the user libraries.
The optee-client patch is under review in the OP-TEE project [1] and
should be merged in the next OP-TEE release 3.5.0.
This change drops !BR2_STATIC_LIBS constraint on package optee-client.
[1] https://github.com/OP-TEE/optee_client/pull/147
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
.../0001-libteec-fix-build-warnings.patch | 4 +-
...pport-BUILD_STATIC_LIBS-BUILD_SHARED_LIBS.patch | 51 ++++++++++++++++++++++
package/optee-client/Config.in | 4 --
3 files changed, 53 insertions(+), 6 deletions(-)
create mode 100644 package/optee-client/0002-cmake-support-BUILD_STATIC_LIBS-BUILD_SHARED_LIBS.patch
diff --git a/package/optee-client/0001-libteec-fix-build-warnings.patch b/package/optee-client/0001-libteec-fix-build-warnings.patch
index 21f47ec..aec07b4 100644
--- a/package/optee-client/0001-libteec-fix-build-warnings.patch
+++ b/package/optee-client/0001-libteec-fix-build-warnings.patch
@@ -1,7 +1,7 @@
-From 657414ccd20b4fb2985efd83b0679964fec923c2 Mon Sep 17 00:00:00 2001
+From 2f5ab18b4886b31a33850ee51f33fb753e9c7b7f Mon Sep 17 00:00:00 2001
From: Etienne Carriere <etienne.carriere@linaro.org>
Date: Fri, 1 Mar 2019 09:36:46 +0100
-Subject: [PATCH] libteec: fix build warnings
+Subject: [PATCH 1/2] libteec: fix build warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
diff --git a/package/optee-client/0002-cmake-support-BUILD_STATIC_LIBS-BUILD_SHARED_LIBS.patch b/package/optee-client/0002-cmake-support-BUILD_STATIC_LIBS-BUILD_SHARED_LIBS.patch
new file mode 100644
index 0000000..f63f1a3
--- /dev/null
+++ b/package/optee-client/0002-cmake-support-BUILD_STATIC_LIBS-BUILD_SHARED_LIBS.patch
@@ -0,0 +1,51 @@
+From 857ed6a900e2f16035a88e73e47d79e9251f6544 Mon Sep 17 00:00:00 2001
+From: Etienne Carriere <etienne.carriere@linaro.org>
+Date: Fri, 1 Mar 2019 12:31:48 +0100
+Subject: [PATCH 2/2] cmake: support BUILD_STATIC_LIBS/BUILD_SHARED_LIBS
+
+CMake variables BUILD_STATIC_LIBS and BUILD_SHARED_LIBS
+set constraints on libraries and executable linkage.
+
+With this change OP-TEE client CMake script builds and installs the
+embedded files with the expected linkage configuration.
+
+Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
+---
+ libteec/CMakeLists.txt | 5 +++--
+ tee-supplicant/CMakeLists.txt | 2 +-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/libteec/CMakeLists.txt b/libteec/CMakeLists.txt
+index 3ec8f66..e3495fb 100644
+--- a/libteec/CMakeLists.txt
++++ b/libteec/CMakeLists.txt
+@@ -33,7 +33,7 @@ endif()
+ ################################################################################
+ # Built library
+ ################################################################################
+-add_library (teec SHARED ${SRC})
++add_library (teec ${SRC})
+
+ set_target_properties (teec PROPERTIES
+ VERSION ${PROJECT_VERSION}
+@@ -71,4 +71,5 @@ target_link_libraries (teec
+ ################################################################################
+ # FIXME: This should in someway harmonize with CFG_TEE_CLIENT_LOAD_PATH
+ # FIXME: Should we change this to /usr/local/lib?
+-install (TARGETS teec DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install (TARGETS teec LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
++ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+diff --git a/tee-supplicant/CMakeLists.txt b/tee-supplicant/CMakeLists.txt
+index d2d3afd..e663be9 100644
+--- a/tee-supplicant/CMakeLists.txt
++++ b/tee-supplicant/CMakeLists.txt
+@@ -85,4 +85,4 @@ target_link_libraries (${PROJECT_NAME}
+ ################################################################################
+ # Install targets
+ ################################################################################
+-install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_SBINDIR})
++install (TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
+--
+1.9.1
+
diff --git a/package/optee-client/Config.in b/package/optee-client/Config.in
index db0b7b7..0de136c 100644
--- a/package/optee-client/Config.in
+++ b/package/optee-client/Config.in
@@ -1,6 +1,5 @@
config BR2_PACKAGE_OPTEE_CLIENT
bool "optee-client"
- depends on !BR2_STATIC_LIBS
help
Enable the OP-TEE client package that brings non-secure
client application resources for OP-TEE support. OP-TEE
@@ -12,6 +11,3 @@ config BR2_PACKAGE_OPTEE_CLIENT
and invoked by the secure world.
https://github.com/OP-TEE/optee_client
-
-comment "optee-client needs a toolchain w/ dynamic library"
- depends on BR2_STATIC_LIBS
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 6/9] package/optee-test: drop constraint on !BR2_STATIC_LIBS
2019-03-01 16:47 [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Etienne Carriere
` (3 preceding siblings ...)
2019-03-01 16:47 ` [Buildroot] [PATCH/next 5/9] package/optee-client: support BUILD_STATIC_LIBS Etienne Carriere
@ 2019-03-01 16:47 ` Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 7/9] package/optee-examples: " Etienne Carriere
` (3 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Etienne Carriere @ 2019-03-01 16:47 UTC (permalink / raw)
To: buildroot
Optee-client recently supports BR2_STATIC_LIBS and
BR2_SHARED_LIBS directives. This change removes the constraint
on package optee-test that now supports static linking of
embedded binaries.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
package/optee-test/Config.in | 5 -----
1 file changed, 5 deletions(-)
diff --git a/package/optee-test/Config.in b/package/optee-test/Config.in
index 575790b..2bccc76 100644
--- a/package/optee-test/Config.in
+++ b/package/optee-test/Config.in
@@ -1,7 +1,6 @@
config BR2_PACKAGE_OPTEE_TEST
bool "optee-test"
depends on BR2_TARGET_OPTEE_OS
- depends on !BR2_STATIC_LIBS # optee-client
select BR2_PACKAGE_OPTEE_CLIENT
select BR2_TARGET_OPTEE_OS_SDK
help
@@ -21,7 +20,3 @@ config BR2_PACKAGE_OPTEE_TEST
execution.
http://github.com/OP-TEE/optee_test
-
-comment "optee-test needs a toolchain w/ dynamic library"
- depends on BR2_TARGET_OPTEE_OS
- depends on BR2_STATIC_LIBS
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 7/9] package/optee-examples: drop constraint on !BR2_STATIC_LIBS
2019-03-01 16:47 [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Etienne Carriere
` (4 preceding siblings ...)
2019-03-01 16:47 ` [Buildroot] [PATCH/next 6/9] package/optee-test: drop constraint on !BR2_STATIC_LIBS Etienne Carriere
@ 2019-03-01 16:47 ` Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 8/9] package/optee-benchmark: " Etienne Carriere
` (2 subsequent siblings)
8 siblings, 0 replies; 14+ messages in thread
From: Etienne Carriere @ 2019-03-01 16:47 UTC (permalink / raw)
To: buildroot
Optee-client recently supports BR2_STATIC_LIBS and
BR2_SHARED_LIBS directives. This change removes the constraint
on package optee-examples that now supports static linking of
embedded binaries.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
package/optee-examples/Config.in | 5 -----
1 file changed, 5 deletions(-)
diff --git a/package/optee-examples/Config.in b/package/optee-examples/Config.in
index 479f920..3f730ca 100644
--- a/package/optee-examples/Config.in
+++ b/package/optee-examples/Config.in
@@ -1,7 +1,6 @@
config BR2_PACKAGE_OPTEE_EXAMPLES
bool "optee-examples"
depends on BR2_TARGET_OPTEE_OS
- depends on !BR2_STATIC_LIBS # optee-client
select BR2_PACKAGE_OPTEE_CLIENT
select BR2_TARGET_OPTEE_OS_SDK
help
@@ -17,7 +16,3 @@ config BR2_PACKAGE_OPTEE_EXAMPLES
execution.
https://github.com/linaro-swg/optee_examples
-
-comment "optee-examples needs a toolchain w/ dynamic library"
- depends on BR2_TARGET_OPTEE_OS
- depends on BR2_STATIC_LIBS
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 8/9] package/optee-benchmark: drop constraint on !BR2_STATIC_LIBS
2019-03-01 16:47 [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Etienne Carriere
` (5 preceding siblings ...)
2019-03-01 16:47 ` [Buildroot] [PATCH/next 7/9] package/optee-examples: " Etienne Carriere
@ 2019-03-01 16:47 ` Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 9/9] boot/optee-os: support alternate image files Etienne Carriere
2019-03-05 22:25 ` [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Thomas Petazzoni
8 siblings, 0 replies; 14+ messages in thread
From: Etienne Carriere @ 2019-03-01 16:47 UTC (permalink / raw)
To: buildroot
Optee-client recently supports BR2_STATIC_LIBS and
BR2_SHARED_LIBS directives. This change removes the constraint
on package optee-benchmarktest that now supports static linking of
embedded binaries.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
package/optee-benchmark/Config.in | 4 ----
1 file changed, 4 deletions(-)
diff --git a/package/optee-benchmark/Config.in b/package/optee-benchmark/Config.in
index 0e36549..a4af645 100644
--- a/package/optee-benchmark/Config.in
+++ b/package/optee-benchmark/Config.in
@@ -1,6 +1,5 @@
config BR2_PACKAGE_OPTEE_BENCHMARK
bool "optee-benchmark"
- depends on !BR2_STATIC_LIBS # optee-client
select BR2_PACKAGE_OPTEE_CLIENT
select BR2_PACKAGE_LIBYAML
help
@@ -10,6 +9,3 @@ config BR2_PACKAGE_OPTEE_BENCHMARK
by the OP-TEE project.
http://github.com/linaro-swg/optee_benchmark
-
-comment "optee-benchmark needs a toolchain w/ dynamic library"
- depends on BR2_STATIC_LIBS
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 9/9] boot/optee-os: support alternate image files
2019-03-01 16:47 [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Etienne Carriere
` (6 preceding siblings ...)
2019-03-01 16:47 ` [Buildroot] [PATCH/next 8/9] package/optee-benchmark: " Etienne Carriere
@ 2019-03-01 16:47 ` Etienne Carriere
2019-08-03 16:14 ` Thomas Petazzoni
2019-03-05 22:25 ` [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Thomas Petazzoni
8 siblings, 1 reply; 14+ messages in thread
From: Etienne Carriere @ 2019-03-01 16:47 UTC (permalink / raw)
To: buildroot
Some platform may generate specific boot image files instead of
the generic files tee.bin and tee-*_v2.bin when building OP-TEE OS
package.
This change introduces optee-os configuration directive
BR2_TARGET_OPTEE_OS_CORE_IMAGES that allows board configuration
to specify its expected boot image file names.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
---
boot/optee-os/Config.in | 13 +++++++++++++
boot/optee-os/optee-os.mk | 7 +++++--
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/boot/optee-os/Config.in b/boot/optee-os/Config.in
index a1f1b91..0f2df27 100644
--- a/boot/optee-os/Config.in
+++ b/boot/optee-os/Config.in
@@ -99,4 +99,17 @@ config BR2_TARGET_OPTEE_OS_ADDITIONAL_VARIABLES
Additional parameters for the OP-TEE OS build
E.g. 'CFG_TEE_CORE_LOG_LEVEL=3 CFG_UNWIND=y'
+config BR2_TARGET_OPTEE_OS_CORE_IMAGES
+ string "Binary boot image filenames"
+ default "tee-header_v2.bin tee-pager_v2.bin"
+ help
+ Names of generated image files that are installed in the
+ output images/ directory.
+
+ With OP-TEE pager disabled, defaults are tee-header_v2.bin
+ and tee-pager_v2.bin.
+
+ With OP-TEE pager enabled, one would select the 3 files
+ tee-header_v2.bin, tee-pager_v2.bin and tee-pageable_v2.bin.
+
endif # BR2_TARGET_OPTEE_OS
diff --git a/boot/optee-os/optee-os.mk b/boot/optee-os/optee-os.mk
index df481c9..e445e72 100644
--- a/boot/optee-os/optee-os.mk
+++ b/boot/optee-os/optee-os.mk
@@ -62,6 +62,8 @@ OPTEE_OS_LOCAL_SDK = $(OPTEE_OS_BUILDDIR_OUT)/export-ta_arm32
OPTEE_OS_STAGING_SDK = $(STAGING_DIR)/lib/optee/export-ta_arm32
endif
+OPTEE_OS_IMAGE_FILES = $(call qstrip,$(BR2_TARGET_OPTEE_OS_CORE_IMAGES))
+
ifeq ($(BR2_TARGET_OPTEE_OS_CORE),y)
define OPTEE_OS_BUILD_CORE
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) O=$(OPTEE_OS_BUILDDIR_OUT) \
@@ -69,8 +71,9 @@ define OPTEE_OS_BUILD_CORE
endef
define OPTEE_OS_INSTALL_IMAGES_CORE
mkdir -p $(BINARIES_DIR)
- cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/tee.bin $(BINARIES_DIR)
- cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/tee-*_v2.bin $(BINARIES_DIR)
+ $(foreach f,$(OPTEE_OS_IMAGE_FILES), \
+ cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/$(f) $(BINARIES_DIR)/
+ )
endef
endif # BR2_TARGET_OPTEE_OS_CORE
--
1.9.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location
2019-03-01 16:47 [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Etienne Carriere
` (7 preceding siblings ...)
2019-03-01 16:47 ` [Buildroot] [PATCH/next 9/9] boot/optee-os: support alternate image files Etienne Carriere
@ 2019-03-05 22:25 ` Thomas Petazzoni
8 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2019-03-05 22:25 UTC (permalink / raw)
To: buildroot
On Fri, 1 Mar 2019 17:47:05 +0100
Etienne Carriere <etienne.carriere@linaro.org> wrote:
> Makefile script for boot package optee-os produces make variable
> OPTEE_OS_STAGING_SDK to locate the Trusted Application SDK expected
> by other packages when building OP-TEE trusted applications.
>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
> ---
> boot/optee-os/optee-os.mk | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
I changed the variable name to be just OPTEE_OS_SDK, and applied after
adjusting the commit log. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 2/9] package/optee-test: locate TA SDK though optee-os package
2019-03-01 16:47 ` [Buildroot] [PATCH/next 2/9] package/optee-test: locate TA SDK though optee-os package Etienne Carriere
@ 2019-03-05 22:25 ` Thomas Petazzoni
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2019-03-05 22:25 UTC (permalink / raw)
To: buildroot
On Fri, 1 Mar 2019 17:47:06 +0100
Etienne Carriere <etienne.carriere@linaro.org> wrote:
> Package optee-os was recently changed to produce variable
> OPTEE_OS_STAGING_SDK to other packages to locate the OP-TEE Trusted
> Application SDK generated from optee-os package and installed in
> the Buildroot output staging directory.
>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
> ---
> package/optee-test/optee-test.mk | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
Applied to master, after adjusting the commit log and the variable
name. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 3/9] package/optee-examples: locate TA SDK though optee-os package
2019-03-01 16:47 ` [Buildroot] [PATCH/next 3/9] package/optee-examples: " Etienne Carriere
@ 2019-03-05 22:25 ` Thomas Petazzoni
0 siblings, 0 replies; 14+ messages in thread
From: Thomas Petazzoni @ 2019-03-05 22:25 UTC (permalink / raw)
To: buildroot
On Fri, 1 Mar 2019 17:47:07 +0100
Etienne Carriere <etienne.carriere@linaro.org> wrote:
> Package optee-os was recently changed to produce variable
> OPTEE_OS_STAGING_SDK to other packages to locate the OP-TEE Trusted
> Application SDK generated from optee-os package and installed in
> the Buildroot output staging directory.
>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
> ---
> package/optee-examples/optee-examples.mk | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
Applied to master after adjusting the variable name and commit log.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 9/9] boot/optee-os: support alternate image files
2019-03-01 16:47 ` [Buildroot] [PATCH/next 9/9] boot/optee-os: support alternate image files Etienne Carriere
@ 2019-08-03 16:14 ` Thomas Petazzoni
2019-08-09 8:50 ` Etienne Carriere
0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2019-08-03 16:14 UTC (permalink / raw)
To: buildroot
Etienne,
On Fri, 1 Mar 2019 17:47:13 +0100
Etienne Carriere <etienne.carriere@linaro.org> wrote:
> Some platform may generate specific boot image files instead of
> the generic files tee.bin and tee-*_v2.bin when building OP-TEE OS
> package.
>
> This change introduces optee-os configuration directive
> BR2_TARGET_OPTEE_OS_CORE_IMAGES that allows board configuration
> to specify its expected boot image file names.
>
> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Thanks, I've applied this patch, with some changes. See below.
> +config BR2_TARGET_OPTEE_OS_CORE_IMAGES
> + string "Binary boot image filenames"
> + default "tee-header_v2.bin tee-pager_v2.bin"
The problem with this default value is that it breaks existing
configurations. Indeed, today (without your patch), was get copied is
tee.bin tee-*_v2.bin. So we want to preserve this behavior, and to
achieve that, I've changed this line to:
default "tee.bin tee-*_v2.bin"
> + With OP-TEE pager disabled, defaults are tee-header_v2.bin
> + and tee-pager_v2.bin.
> +
> + With OP-TEE pager enabled, one would select the 3 files
> + tee-header_v2.bin, tee-pager_v2.bin and tee-pageable_v2.bin.
I dropped these details, which I think are no longer that relevant with
the changed default value.
> define OPTEE_OS_INSTALL_IMAGES_CORE
> mkdir -p $(BINARIES_DIR)
> - cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/tee.bin $(BINARIES_DIR)
> - cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/tee-*_v2.bin $(BINARIES_DIR)
> + $(foreach f,$(OPTEE_OS_IMAGE_FILES), \
> + cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/$(f) $(BINARIES_DIR)/
I have changed this to:
cp -dpf $(wildcard $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/$(f)) $(BINARIES_DIR)/
so that the tee-*_v2.bin gets properly expanded. I tested with a
Marvell Armada 7K/8K OP-TEE configuration, and it continued to properly
install the .bin files that were installed before this patch.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Buildroot] [PATCH/next 9/9] boot/optee-os: support alternate image files
2019-08-03 16:14 ` Thomas Petazzoni
@ 2019-08-09 8:50 ` Etienne Carriere
0 siblings, 0 replies; 14+ messages in thread
From: Etienne Carriere @ 2019-08-09 8:50 UTC (permalink / raw)
To: buildroot
Hi Thomas,
Thanks for the review, fixes and merge.
Regards,
etienne
On Sat, 3 Aug 2019 at 18:14, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Etienne,
>
> On Fri, 1 Mar 2019 17:47:13 +0100
> Etienne Carriere <etienne.carriere@linaro.org> wrote:
>
> > Some platform may generate specific boot image files instead of
> > the generic files tee.bin and tee-*_v2.bin when building OP-TEE OS
> > package.
> >
> > This change introduces optee-os configuration directive
> > BR2_TARGET_OPTEE_OS_CORE_IMAGES that allows board configuration
> > to specify its expected boot image file names.
> >
> > Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
>
> Thanks, I've applied this patch, with some changes. See below.
>
> > +config BR2_TARGET_OPTEE_OS_CORE_IMAGES
> > + string "Binary boot image filenames"
> > + default "tee-header_v2.bin tee-pager_v2.bin"
>
> The problem with this default value is that it breaks existing
> configurations. Indeed, today (without your patch), was get copied is
> tee.bin tee-*_v2.bin. So we want to preserve this behavior, and to
> achieve that, I've changed this line to:
>
> default "tee.bin tee-*_v2.bin"
>
>
> > + With OP-TEE pager disabled, defaults are tee-header_v2.bin
> > + and tee-pager_v2.bin.
> > +
> > + With OP-TEE pager enabled, one would select the 3 files
> > + tee-header_v2.bin, tee-pager_v2.bin and tee-pageable_v2.bin.
>
> I dropped these details, which I think are no longer that relevant with
> the changed default value.
>
> > define OPTEE_OS_INSTALL_IMAGES_CORE
> > mkdir -p $(BINARIES_DIR)
> > - cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/tee.bin $(BINARIES_DIR)
> > - cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/tee-*_v2.bin $(BINARIES_DIR)
> > + $(foreach f,$(OPTEE_OS_IMAGE_FILES), \
> > + cp -dpf $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/$(f) $(BINARIES_DIR)/
>
> I have changed this to:
>
> cp -dpf $(wildcard $(@D)/$(OPTEE_OS_BUILDDIR_OUT)/core/$(f)) $(BINARIES_DIR)/
>
> so that the tee-*_v2.bin gets properly expanded. I tested with a
> Marvell Armada 7K/8K OP-TEE configuration, and it continued to properly
> install the .bin files that were installed before this patch.
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2019-08-09 8:50 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-01 16:47 [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 2/9] package/optee-test: locate TA SDK though optee-os package Etienne Carriere
2019-03-05 22:25 ` Thomas Petazzoni
2019-03-01 16:47 ` [Buildroot] [PATCH/next 3/9] package/optee-examples: " Etienne Carriere
2019-03-05 22:25 ` Thomas Petazzoni
2019-03-01 16:47 ` [Buildroot] [PATCH/next 4/9] package/optee-client: fix build warnings 3.4.0 Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 5/9] package/optee-client: support BUILD_STATIC_LIBS Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 6/9] package/optee-test: drop constraint on !BR2_STATIC_LIBS Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 7/9] package/optee-examples: " Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 8/9] package/optee-benchmark: " Etienne Carriere
2019-03-01 16:47 ` [Buildroot] [PATCH/next 9/9] boot/optee-os: support alternate image files Etienne Carriere
2019-08-03 16:14 ` Thomas Petazzoni
2019-08-09 8:50 ` Etienne Carriere
2019-03-05 22:25 ` [Buildroot] [PATCH/next 1/9] boot/optee-os: package sets TA SDK location Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox