* [PATCH 1/7] arm/optee-os: improve sysroot lookup
@ 2020-11-02 15:33 Ross Burton
2020-11-02 15:33 ` [PATCH 2/7] arm/optee-test: add bug links Ross Burton
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Ross Burton @ 2020-11-02 15:33 UTC (permalink / raw)
To: meta-arm
optee-test uses the same functionality to find libstdc++ and libgcc_eh,
so ensure that these libraries are found with the right sysroot too.
Change-Id: Ice0506a42655223045bcabec790eae3a3dbcf245
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
...ow-setting-sysroot-for-libgcc-lookup.patch | 26 ++++++++++++++-----
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/meta-arm/recipes-security/optee/optee-os/0006-allow-setting-sysroot-for-libgcc-lookup.patch b/meta-arm/recipes-security/optee/optee-os/0006-allow-setting-sysroot-for-libgcc-lookup.patch
index 86e8428..1700539 100644
--- a/meta-arm/recipes-security/optee/optee-os/0006-allow-setting-sysroot-for-libgcc-lookup.patch
+++ b/meta-arm/recipes-security/optee/optee-os/0006-allow-setting-sysroot-for-libgcc-lookup.patch
@@ -1,22 +1,34 @@
-From 017994c477e2d082395460de83a7828d4e7d4b70 Mon Sep 17 00:00:00 2001
-From: Joshua Watt <JPEWhacker@gmail.com>
+From 0bab935695ebcf0c533b49896ab18ff33d4a47d1 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
Date: Tue, 26 May 2020 14:38:02 -0500
Subject: [PATCH] allow setting sysroot for libgcc lookup
+Explicitly pass the new variable LIBGCC_LOCATE_CFLAGS variable when searching
+for the compiler libraries as there's no easy way to reliably pass --sysroot
+otherwise.
+
+Upstream-Status: Pending [https://github.com/OP-TEE/optee_os/issues/4188]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
---
- mk/gcc.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+ mk/gcc.mk | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mk/gcc.mk b/mk/gcc.mk
-index adc77a24..e238b9f3 100644
+index adc77a24..81bfa78a 100644
--- a/mk/gcc.mk
+++ b/mk/gcc.mk
-@@ -13,7 +13,7 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \
+@@ -13,11 +13,11 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \
-print-file-name=include 2> /dev/null)
# Get location of libgcc from gcc
-libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \
+libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \
-print-libgcc-file-name 2> /dev/null)
- libstdc++$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
+-libstdc++$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
++libstdc++$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
-print-file-name=libstdc++.a 2> /dev/null)
+-libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
++libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
+ -print-file-name=libgcc_eh.a 2> /dev/null)
+
+ # Define these to something to discover accidental use
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/7] arm/optee-test: add bug links
2020-11-02 15:33 [PATCH 1/7] arm/optee-os: improve sysroot lookup Ross Burton
@ 2020-11-02 15:33 ` Ross Burton
2020-11-02 15:33 ` [PATCH 3/7] arm/optee-os: fix the optee-test build with GCC 10 Ross Burton
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Ross Burton @ 2020-11-02 15:33 UTC (permalink / raw)
To: meta-arm
These issues now have upstream bugs.
Change-Id: I9eacedbbf6e7874f6d1843b08fd9a8c04d030855
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
.../0001-host-xtest-Adjust-order-of-including-compiler.h.patch | 2 +-
.../optee-test/0002-make-remove-Wno-unsafe-loop-for-clang.patch | 2 +-
.../0003-make-remove-Wmissing-noreturn-for-clang.patch | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta-arm/recipes-security/optee/optee-test/0001-host-xtest-Adjust-order-of-including-compiler.h.patch b/meta-arm/recipes-security/optee/optee-test/0001-host-xtest-Adjust-order-of-including-compiler.h.patch
index 3066b66..3c500d7 100644
--- a/meta-arm/recipes-security/optee/optee-test/0001-host-xtest-Adjust-order-of-including-compiler.h.patch
+++ b/meta-arm/recipes-security/optee/optee-test/0001-host-xtest-Adjust-order-of-including-compiler.h.patch
@@ -12,7 +12,7 @@ recipe-sysroot/usr/include/bits/stat.h:17:19: error: expected identifier or '('
^
including compiler.h afer sys/stat.h fixes the problem.
-Upstream-Status: Pending
+Upstream-Status: Pending [https://github.com/OP-TEE/optee_test/issues/453]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
host/xtest/install_ta.c | 2 +-
diff --git a/meta-arm/recipes-security/optee/optee-test/0002-make-remove-Wno-unsafe-loop-for-clang.patch b/meta-arm/recipes-security/optee/optee-test/0002-make-remove-Wno-unsafe-loop-for-clang.patch
index ef09c56..17dd7d8 100644
--- a/meta-arm/recipes-security/optee/optee-test/0002-make-remove-Wno-unsafe-loop-for-clang.patch
+++ b/meta-arm/recipes-security/optee/optee-test/0002-make-remove-Wno-unsafe-loop-for-clang.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] make: remove -Wmissing-noreturn for clang
When compiling when clang, -Wmissing-noreturn causes an error because
of non-compliant code. This option is removed to workaround this.
-Upstream-Status: Pending
+Upstream-Status: Pending [https://github.com/OP-TEE/optee_test/issues/452]
Changed-Id: 71cb511904547d790d1ea98f93bf8e5a6afcb36d
Signed-off-by: Brett Warren <brett.warren@arm.com>
---
diff --git a/meta-arm/recipes-security/optee/optee-test/0003-make-remove-Wmissing-noreturn-for-clang.patch b/meta-arm/recipes-security/optee/optee-test/0003-make-remove-Wmissing-noreturn-for-clang.patch
index b265e81..bbc303f 100644
--- a/meta-arm/recipes-security/optee/optee-test/0003-make-remove-Wmissing-noreturn-for-clang.patch
+++ b/meta-arm/recipes-security/optee/optee-test/0003-make-remove-Wmissing-noreturn-for-clang.patch
@@ -7,7 +7,7 @@ When compiling with clang, the -Wno-unsafe-loop-optimizations option
throws an error because clang doesn't recognise it. This option is
removed to workaround this.
-Upstream-Status: Pending
+Upstream-Status: Pending [https://github.com/OP-TEE/optee_test/issues/452]
Change-Id: 5fe0892c73208aaffac8c9995cb3275936fb1ba6
Signed-off-by: Brett Warren <brett.warren@arm.com>
---
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/7] arm/optee-os: fix the optee-test build with GCC 10
2020-11-02 15:33 [PATCH 1/7] arm/optee-os: improve sysroot lookup Ross Burton
2020-11-02 15:33 ` [PATCH 2/7] arm/optee-test: add bug links Ross Burton
@ 2020-11-02 15:33 ` Ross Burton
2020-11-02 15:33 ` [PATCH 4/7] arm/optee-client: rewrite recipe Ross Burton
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Ross Burton @ 2020-11-02 15:33 UTC (permalink / raw)
To: meta-arm
GCC 10 calls __getauxval in some situations so backport some patches
from upstream to fix the linking with this symbol.
Change-Id: I68af7ff9d058b9f602f54350a35908d178a8e688
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
...ide-empty-__getauxval-implementation.patch | 62 +++++++++++++++++++
...t-support-for-libnames-after-libgcc-.patch | 55 ++++++++++++++++
...ke-sure-that-libutils-is-linked-seco.patch | 44 +++++++++++++
.../recipes-security/optee/optee-os_3.11.0.bb | 4 +-
4 files changed, 164 insertions(+), 1 deletion(-)
create mode 100644 meta-arm/recipes-security/optee/optee-os/0001-libutils-provide-empty-__getauxval-implementation.patch
create mode 100644 meta-arm/recipes-security/optee/optee-os/0002-link.mk-implement-support-for-libnames-after-libgcc-.patch
create mode 100644 meta-arm/recipes-security/optee/optee-os/0003-ta_dev_kit.mk-make-sure-that-libutils-is-linked-seco.patch
diff --git a/meta-arm/recipes-security/optee/optee-os/0001-libutils-provide-empty-__getauxval-implementation.patch b/meta-arm/recipes-security/optee/optee-os/0001-libutils-provide-empty-__getauxval-implementation.patch
new file mode 100644
index 0000000..0120f5c
--- /dev/null
+++ b/meta-arm/recipes-security/optee/optee-os/0001-libutils-provide-empty-__getauxval-implementation.patch
@@ -0,0 +1,62 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From 36e784f621bf5d5be9183beba35f39426277c110 Mon Sep 17 00:00:00 2001
+From: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
+Date: Tue, 13 Oct 2020 22:45:39 +0300
+Subject: [PATCH 1/3] libutils: provide empty __getauxval() implementation
+
+Never version of libgcc are built with LSE implementation in mind. To
+determine if LSE is available on platform it calls __getauxval(), so in
+some cases we can get undefined reference to __getauxval() error.
+
+Prominent case is libgcc_eh.a library, which is used by C++ TAs. Exception
+handler depends on atomic operations, so it tries to call
+init_have_lse_atomics() first. This function in turn calls __getauxval(),
+which causes linking error.
+
+In the future we can make __getauxval() to return actual platform
+capabilities.
+
+Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
+Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
+Reviewed-by: Jerome Forissier <jerome@forissier.org>
+---
+ lib/libutils/ext/arch/arm/auxval.c | 12 ++++++++++++
+ lib/libutils/ext/arch/arm/sub.mk | 1 +
+ 2 files changed, 13 insertions(+)
+ create mode 100644 lib/libutils/ext/arch/arm/auxval.c
+
+diff --git a/lib/libutils/ext/arch/arm/auxval.c b/lib/libutils/ext/arch/arm/auxval.c
+new file mode 100644
+index 00000000..98bca850
+--- /dev/null
++++ b/lib/libutils/ext/arch/arm/auxval.c
+@@ -0,0 +1,12 @@
++// SPDX-License-Identifier: BSD-2-Clause
++/*
++ * Copyright (c) 2020, EPAM Systems
++ */
++
++#include <compiler.h>
++
++unsigned long int __getauxval (unsigned long int type);
++unsigned long int __getauxval (unsigned long int type __unused)
++{
++ return 0;
++}
+diff --git a/lib/libutils/ext/arch/arm/sub.mk b/lib/libutils/ext/arch/arm/sub.mk
+index dc5eed67..2e779066 100644
+--- a/lib/libutils/ext/arch/arm/sub.mk
++++ b/lib/libutils/ext/arch/arm/sub.mk
+@@ -3,6 +3,7 @@ srcs-$(CFG_ARM32_$(sm)) += aeabi_unwind.c
+ endif
+ srcs-$(CFG_ARM32_$(sm)) += atomic_a32.S
+ srcs-$(CFG_ARM64_$(sm)) += atomic_a64.S
++srcs-y += auxval.c
+ ifneq ($(sm),ldelf) # TA, core
+ srcs-$(CFG_ARM32_$(sm)) += mcount_a32.S
+ srcs-$(CFG_ARM64_$(sm)) += mcount_a64.S
+--
+2.25.1
+
diff --git a/meta-arm/recipes-security/optee/optee-os/0002-link.mk-implement-support-for-libnames-after-libgcc-.patch b/meta-arm/recipes-security/optee/optee-os/0002-link.mk-implement-support-for-libnames-after-libgcc-.patch
new file mode 100644
index 0000000..11296c8
--- /dev/null
+++ b/meta-arm/recipes-security/optee/optee-os/0002-link.mk-implement-support-for-libnames-after-libgcc-.patch
@@ -0,0 +1,55 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From 73196b58ea6978ffa5e581738030f51c5789ef73 Mon Sep 17 00:00:00 2001
+From: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
+Date: Tue, 13 Oct 2020 22:54:13 +0300
+Subject: [PATCH 2/3] link.mk: implement support for libnames-after-libgcc
+ variable
+
+Newer versions of libgcc depend on external __getauxval() symbol, which is
+now provided by libutils. But libgcc is linked after libutils, so linker
+can't resolve that symbol. We can't include libgcc into linking group with
+libtutils, because libgcc provides symbols that conflict with libutil's
+ones, like __aeabi_idiv with friends for instance.
+
+So, to resolve libgcc dependency on libutils we need to link with libutils
+second time. To make things more generic, we will introduce
+$(libnames-after-libgcc) variable for libraries that should be linked after
+libgcc.
+
+Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
+Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
+Reviewed-by: Jerome Forissier <jerome@forissier.org>
+---
+ ta/arch/arm/link.mk | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/ta/arch/arm/link.mk b/ta/arch/arm/link.mk
+index 445c285d..3025acb1 100644
+--- a/ta/arch/arm/link.mk
++++ b/ta/arch/arm/link.mk
+@@ -55,8 +55,11 @@ link-ldflags += --eh-frame-hdr
+ link-ldadd += $(libstdc++$(sm)) $(libgcc_eh$(sm))
+ endif
+ link-ldadd += --end-group
+-ldargs-$(user-ta-uuid).elf := $(link-ldflags) $(objs) $(link-ldadd) $(libgcc$(sm))
+
++link-ldadd-after-libgcc += $(addprefix -l,$(libnames-after-libgcc))
++
++ldargs-$(user-ta-uuid).elf := $(link-ldflags) $(objs) $(link-ldadd) \
++ $(libgcc$(sm)) $(link-ldadd-after-libgcc)
+
+ link-script-cppflags-$(sm) := \
+ $(filter-out $(CPPFLAGS_REMOVE) $(cppflags-remove), \
+@@ -76,6 +79,7 @@ $(link-script-pp$(sm)): $(link-script$(sm)) $(conf-file) $(link-script-pp-makefi
+ $(link-script-cppflags-$(sm)) $$< -o $$@
+
+ $(link-out-dir$(sm))/$(user-ta-uuid).elf: $(objs) $(libdeps) \
++ $(libdeps-after-libgcc) \
+ $(link-script-pp$(sm)) \
+ $(dynlistdep) \
+ $(additional-link-deps)
+--
+2.25.1
+
diff --git a/meta-arm/recipes-security/optee/optee-os/0003-ta_dev_kit.mk-make-sure-that-libutils-is-linked-seco.patch b/meta-arm/recipes-security/optee/optee-os/0003-ta_dev_kit.mk-make-sure-that-libutils-is-linked-seco.patch
new file mode 100644
index 0000000..88ba5f8
--- /dev/null
+++ b/meta-arm/recipes-security/optee/optee-os/0003-ta_dev_kit.mk-make-sure-that-libutils-is-linked-seco.patch
@@ -0,0 +1,44 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From f50962e3f56f0932662b2ffa10afe53339a335dd Mon Sep 17 00:00:00 2001
+From: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
+Date: Fri, 16 Oct 2020 16:36:08 +0300
+Subject: [PATCH 3/3] ta_dev_kit.mk: make sure that libutils is linked second
+ time
+
+libgcc depends on __getauxval symbol from libuils. As, generally libutils
+is linked before libgcc, we will get "unresolved symbol" error. To resolve
+this dependency we need to link libutils second time - after libgcc.
+
+Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
+Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
+Reviewed-by: Jerome Forissier <jerome@forissier.org>
+---
+ ta/mk/ta_dev_kit.mk | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/ta/mk/ta_dev_kit.mk b/ta/mk/ta_dev_kit.mk
+index e28be677..d0e66317 100644
+--- a/ta/mk/ta_dev_kit.mk
++++ b/ta/mk/ta_dev_kit.mk
+@@ -78,6 +78,16 @@ endif
+ libnames += dl
+ libdeps += $(ta-dev-kit-dir$(sm))/lib/libdl.a
+
++# libutils provides __getauxval symbol which is needed by libgcc 10.x. We can't
++# link libutils after libgcc, because libgcc will replace some symbols provided
++# by libutils, which will cause further linking issues.
++#
++# But if we place libutils before libgcc, linker will not be able to resolve
++# __getauxval. So we need to link with libutils twice: before and after libgcc.
++# Hence it included both in $(libnames) and in $(libnames-after-libgcc)
++libnames-after-libgcc += utils
++libdeps-after-libgcc += $(ta-dev-kit-dir$(sm))/lib/libutils.a
++
+ # Pass config variable (CFG_) from conf.mk on the command line
+ cppflags$(sm) += $(strip \
+ $(foreach var, $(filter CFG_%,$(.VARIABLES)), \
+--
+2.25.1
+
diff --git a/meta-arm/recipes-security/optee/optee-os_3.11.0.bb b/meta-arm/recipes-security/optee/optee-os_3.11.0.bb
index a8f2a11..13b3dc6 100644
--- a/meta-arm/recipes-security/optee/optee-os_3.11.0.bb
+++ b/meta-arm/recipes-security/optee/optee-os_3.11.0.bb
@@ -5,5 +5,7 @@ SRCREV = "c4def2a8262a03244d9a88461699b9b8e43c6b55"
SRC_URI_append = " \
file://0006-allow-setting-sysroot-for-libgcc-lookup.patch \
file://0007-allow-setting-sysroot-for-clang.patch \
+ file://0001-libutils-provide-empty-__getauxval-implementation.patch \
+ file://0002-link.mk-implement-support-for-libnames-after-libgcc-.patch \
+ file://0003-ta_dev_kit.mk-make-sure-that-libutils-is-linked-seco.patch \
"
-
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/7] arm/optee-client: rewrite recipe
2020-11-02 15:33 [PATCH 1/7] arm/optee-os: improve sysroot lookup Ross Burton
2020-11-02 15:33 ` [PATCH 2/7] arm/optee-test: add bug links Ross Burton
2020-11-02 15:33 ` [PATCH 3/7] arm/optee-os: fix the optee-test build with GCC 10 Ross Burton
@ 2020-11-02 15:33 ` Ross Burton
2020-11-04 1:18 ` [meta-arm] " Denys Dmytriyenko
2020-11-02 15:33 ` [PATCH 5/7] arm/optee-examples: cleanup recipe Ross Burton
` (3 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Ross Burton @ 2020-11-02 15:33 UTC (permalink / raw)
To: meta-arm
The license is 2-clause BSD, so specify that precisely.
No need to inherit python3native as it is not used.
Instead of using the bare Makefile build, use CMake.
Change-Id: I324f633428f10fdaabaa57b2f2561c2fdc847919
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
.../recipes-security/optee/optee-client.inc | 35 +++----------------
1 file changed, 5 insertions(+), 30 deletions(-)
diff --git a/meta-arm/recipes-security/optee/optee-client.inc b/meta-arm/recipes-security/optee/optee-client.inc
index d82392c..26f9724 100644
--- a/meta-arm/recipes-security/optee/optee-client.inc
+++ b/meta-arm/recipes-security/optee/optee-client.inc
@@ -2,12 +2,10 @@ SUMMARY = "OP-TEE Client API"
DESCRIPTION = "Open Portable Trusted Execution Environment - Normal World Client side of the TEE"
HOMEPAGE = "https://www.op-tee.org/"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
-require optee.inc
-
-inherit python3native systemd update-rc.d
+inherit systemd update-rc.d cmake
SRC_URI = " \
git://github.com/OP-TEE/optee_client.git \
@@ -16,31 +14,11 @@ SRC_URI = " \
"
S = "${WORKDIR}/git"
-B = "${WORKDIR}/build"
-
-EXTRA_OEMAKE = "O=${B}"
-
-do_compile() {
- cd ${S}
- oe_runmake
-}
-do_compile[cleandirs] = "${B}"
-
-do_install() {
- cd ${S}
- oe_runmake install
-
- install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${sbindir}/tee-supplicant
- install -D -p -m0644 ${B}/export/usr/lib/libteec.so.1.0 ${D}${libdir}/libteec.so.1.0
- ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so
- ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so.1
-
- install -d ${D}${includedir}
- install -p -m0644 ${B}/export/usr/include/*.h ${D}${includedir}
+EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON"
+do_install_append() {
install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service
-
install -D -p -m0755 ${WORKDIR}/tee-supplicant.sh ${D}${sysconfdir}/init.d/tee-supplicant
sed -i -e s:@sysconfdir@:${sysconfdir}:g \
@@ -52,8 +30,5 @@ do_install() {
SYSTEMD_SERVICE_${PN} = "tee-supplicant.service"
INITSCRIPT_PACKAGES = "${PN}"
-
INITSCRIPT_NAME_${PN} = "tee-supplicant"
INITSCRIPT_PARAMS_${PN} = "start 10 1 2 3 4 5 . stop 90 0 6 ."
-
-
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/7] arm/optee-examples: cleanup recipe
2020-11-02 15:33 [PATCH 1/7] arm/optee-os: improve sysroot lookup Ross Burton
` (2 preceding siblings ...)
2020-11-02 15:33 ` [PATCH 4/7] arm/optee-client: rewrite recipe Ross Burton
@ 2020-11-02 15:33 ` Ross Burton
2020-11-02 15:33 ` [PATCH 6/7] arm/optee-os: " Ross Burton
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Ross Burton @ 2020-11-02 15:33 UTC (permalink / raw)
To: meta-arm
Clarify the license and clean up oe_runmake calls.
Change-Id: I6d0eb9aee895e3ed9de73ea14f11084c214ca5af
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta-arm/recipes-security/optee/optee-examples.inc | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/meta-arm/recipes-security/optee/optee-examples.inc b/meta-arm/recipes-security/optee/optee-examples.inc
index 7d12858..73193f5 100644
--- a/meta-arm/recipes-security/optee/optee-examples.inc
+++ b/meta-arm/recipes-security/optee/optee-examples.inc
@@ -2,8 +2,8 @@ SUMMARY = "OP-TEE examples"
DESCRIPTION = "Open Portable Trusted Execution Environment - Sample Applications"
HOMEPAGE = "https://github.com/linaro-swg/optee_examples"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=cd95ab417e23b94f381dafc453d70c30"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=cd95ab417e23b94f381dafc453d70c30"
DEPENDS = "optee-client optee-os python3-pycryptodomex-native"
@@ -36,8 +36,7 @@ TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
do_compile() {
- cd ${S}
- oe_runmake
+ oe_runmake -C ${S}
}
do_compile[cleandirs] = "${B}"
@@ -52,4 +51,3 @@ FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/"
# Imports machine specific configs from staging to build
PACKAGE_ARCH = "${MACHINE_ARCH}"
-
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/7] arm/optee-os: cleanup recipe
2020-11-02 15:33 [PATCH 1/7] arm/optee-os: improve sysroot lookup Ross Burton
` (3 preceding siblings ...)
2020-11-02 15:33 ` [PATCH 5/7] arm/optee-examples: cleanup recipe Ross Burton
@ 2020-11-02 15:33 ` Ross Burton
2020-11-02 15:33 ` [PATCH 7/7] arm/optee: consolidate common variables Ross Burton
2020-11-03 2:10 ` [meta-arm] [PATCH 1/7] arm/optee-os: improve sysroot lookup Jon Mason
6 siblings, 0 replies; 12+ messages in thread
From: Ross Burton @ 2020-11-02 15:33 UTC (permalink / raw)
To: meta-arm
Clarify license and clean up oe_runmake calls.
Change-Id: I5952cd1b8014fa686ce4039fe8abca803fb4306a
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta-arm/recipes-security/optee/optee-os.inc | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/meta-arm/recipes-security/optee/optee-os.inc b/meta-arm/recipes-security/optee/optee-os.inc
index 3094b35..e513fcc 100644
--- a/meta-arm/recipes-security/optee/optee-os.inc
+++ b/meta-arm/recipes-security/optee/optee-os.inc
@@ -2,8 +2,8 @@ SUMMARY = "OP-TEE Trusted OS"
DESCRIPTION = "Open Portable Trusted Execution Environment - Trusted side of the TEE"
HOMEPAGE = "https://www.op-tee.org/"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
inherit deploy python3native
require optee.inc
@@ -48,8 +48,7 @@ LD[unexport] = "1"
do_configure[noexec] = "1"
do_compile() {
- cd ${S}
- oe_runmake all CFG_TEE_TA_LOG_LEVEL=0
+ oe_runmake -C ${S} all CFG_TEE_TA_LOG_LEVEL=0
}
do_compile[cleandirs] = "${B}"
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 7/7] arm/optee: consolidate common variables
2020-11-02 15:33 [PATCH 1/7] arm/optee-os: improve sysroot lookup Ross Burton
` (4 preceding siblings ...)
2020-11-02 15:33 ` [PATCH 6/7] arm/optee-os: " Ross Burton
@ 2020-11-02 15:33 ` Ross Burton
2020-11-04 1:18 ` [meta-arm] " Denys Dmytriyenko
2020-11-03 2:10 ` [meta-arm] [PATCH 1/7] arm/optee-os: improve sysroot lookup Jon Mason
6 siblings, 1 reply; 12+ messages in thread
From: Ross Burton @ 2020-11-02 15:33 UTC (permalink / raw)
To: meta-arm
Move a number of shared varibles into optee.inc so that they don't have
to be duplicated repeatedly.
Change-Id: Ie2565dfa66cbd61aad199224a4cdc7b2e1af0c5d
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
.../recipes-security/optee/optee-examples.inc | 17 +++------------
meta-arm/recipes-security/optee/optee-os.inc | 14 +------------
.../recipes-security/optee/optee-test.inc | 16 +++-----------
meta-arm/recipes-security/optee/optee.inc | 21 +++++++++++++++++++
4 files changed, 28 insertions(+), 40 deletions(-)
diff --git a/meta-arm/recipes-security/optee/optee-examples.inc b/meta-arm/recipes-security/optee/optee-examples.inc
index 73193f5..851043b 100644
--- a/meta-arm/recipes-security/optee/optee-examples.inc
+++ b/meta-arm/recipes-security/optee/optee-examples.inc
@@ -15,26 +15,15 @@ SRC_URI = "git://github.com/linaro-swg/optee_examples.git \
file://0001-make-Pass-ldflags-during-link.patch \
"
-OPTEE_COMPILER = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
-
-EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
- OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \
- TEEC_EXPORT=${TEEC_EXPORT} \
- HOST_CROSS_COMPILE=${TARGET_PREFIX} \
- LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
- COMPILER=${OPTEE_COMPILER} \
- TA_CROSS_COMPILE=${TARGET_PREFIX} \
- V=1 \
+EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
+ HOST_CROSS_COMPILE=${HOST_PREFIX} \
+ TA_CROSS_COMPILE=${HOST_PREFIX} \
OUTPUT_DIR=${B} \
"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
-OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}"
-TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
-TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
-
do_compile() {
oe_runmake -C ${S}
}
diff --git a/meta-arm/recipes-security/optee/optee-os.inc b/meta-arm/recipes-security/optee/optee-os.inc
index e513fcc..ea6c496 100644
--- a/meta-arm/recipes-security/optee/optee-os.inc
+++ b/meta-arm/recipes-security/optee/optee-os.inc
@@ -17,25 +17,13 @@ SRC_URI = "git://github.com/OP-TEE/optee_os.git"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
-OPTEEMACHINE ?= "${MACHINE}"
-OPTEEMACHINE_aarch64_qemuall ?= "vexpress-qemu_armv8a"
-OPTEE_ARCH = "null"
-OPTEE_ARCH_armv7a = "arm32"
-OPTEE_ARCH_aarch64 = "arm64"
-OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}"
-OPTEE_COMPILER = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
-
-
-EXTRA_OEMAKE = " \
+EXTRA_OEMAKE += " \
PLATFORM=${OPTEEMACHINE} \
CFG_${OPTEE_CORE}_core=y \
CROSS_COMPILE_core=${HOST_PREFIX} \
CROSS_COMPILE_ta_${OPTEE_ARCH}=${HOST_PREFIX} \
NOWERROR=1 \
- V=1 \
ta-targets=ta_${OPTEE_ARCH} \
- LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
- COMPILER=${OPTEE_COMPILER} \
O=${B} \
"
diff --git a/meta-arm/recipes-security/optee/optee-test.inc b/meta-arm/recipes-security/optee/optee-test.inc
index 95ed311..467e687 100644
--- a/meta-arm/recipes-security/optee/optee-test.inc
+++ b/meta-arm/recipes-security/optee/optee-test.inc
@@ -19,19 +19,9 @@ SRC_URI = "git://github.com/OP-TEE/optee_test.git \
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
-OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}"
-TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
-TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
-OPTEE_COMPILER = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
-
-EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
- OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \
- TEEC_EXPORT=${TEEC_EXPORT} \
- LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
- COMPILER=${OPTEE_COMPILER} \
- CROSS_COMPILE_HOST=${TARGET_PREFIX} \
- CROSS_COMPILE_TA=${TARGET_PREFIX} \
- V=1 \
+EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
+ CROSS_COMPILE_HOST=${HOST_PREFIX} \
+ CROSS_COMPILE_TA=${HOST_PREFIX} \
O=${B} \
"
diff --git a/meta-arm/recipes-security/optee/optee.inc b/meta-arm/recipes-security/optee/optee.inc
index 4bf87fe..8aaf616 100644
--- a/meta-arm/recipes-security/optee/optee.inc
+++ b/meta-arm/recipes-security/optee/optee.inc
@@ -1,3 +1,24 @@
COMPATIBLE_MACHINE ?= "invalid"
COMPATIBLE_MACHINE_qemuarm64 ?= "qemuarm64"
# Please add supported machines below or set it in .bbappend or .conf
+
+OPTEEMACHINE ?= "${MACHINE}"
+OPTEEMACHINE_aarch64_qemuall ?= "vexpress-qemu_armv8a"
+
+OPTEE_ARCH = "null"
+OPTEE_ARCH_armv7a = "arm32"
+OPTEE_ARCH_aarch64 = "arm64"
+OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}"
+
+OPTEE_COMPILER = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
+
+# Set here but not passed to EXTRA_OEMAKE by default as that breaks
+# the optee-os build
+TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
+
+EXTRA_OEMAKE += "V=1 \
+ LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
+ COMPILER=${OPTEE_COMPILER} \
+ OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${prefix} \
+ TEEC_EXPORT=${STAGING_DIR_HOST}${prefix} \
+ "
--
2.25.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [meta-arm] [PATCH 1/7] arm/optee-os: improve sysroot lookup
2020-11-02 15:33 [PATCH 1/7] arm/optee-os: improve sysroot lookup Ross Burton
` (5 preceding siblings ...)
2020-11-02 15:33 ` [PATCH 7/7] arm/optee: consolidate common variables Ross Burton
@ 2020-11-03 2:10 ` Jon Mason
6 siblings, 0 replies; 12+ messages in thread
From: Jon Mason @ 2020-11-03 2:10 UTC (permalink / raw)
To: Ross Burton; +Cc: meta-arm
On Mon, Nov 02, 2020 at 03:33:35PM +0000, Ross Burton wrote:
> optee-test uses the same functionality to find libstdc++ and libgcc_eh,
> so ensure that these libraries are found with the right sysroot too.
>
> Change-Id: Ice0506a42655223045bcabec790eae3a3dbcf245
> Signed-off-by: Ross Burton <ross.burton@arm.com>
Series applied to master.
Thanks,
Jon
> ---
> ...ow-setting-sysroot-for-libgcc-lookup.patch | 26 ++++++++++++++-----
> 1 file changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/meta-arm/recipes-security/optee/optee-os/0006-allow-setting-sysroot-for-libgcc-lookup.patch b/meta-arm/recipes-security/optee/optee-os/0006-allow-setting-sysroot-for-libgcc-lookup.patch
> index 86e8428..1700539 100644
> --- a/meta-arm/recipes-security/optee/optee-os/0006-allow-setting-sysroot-for-libgcc-lookup.patch
> +++ b/meta-arm/recipes-security/optee/optee-os/0006-allow-setting-sysroot-for-libgcc-lookup.patch
> @@ -1,22 +1,34 @@
> -From 017994c477e2d082395460de83a7828d4e7d4b70 Mon Sep 17 00:00:00 2001
> -From: Joshua Watt <JPEWhacker@gmail.com>
> +From 0bab935695ebcf0c533b49896ab18ff33d4a47d1 Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@arm.com>
> Date: Tue, 26 May 2020 14:38:02 -0500
> Subject: [PATCH] allow setting sysroot for libgcc lookup
>
> +Explicitly pass the new variable LIBGCC_LOCATE_CFLAGS variable when searching
> +for the compiler libraries as there's no easy way to reliably pass --sysroot
> +otherwise.
> +
> +Upstream-Status: Pending [https://github.com/OP-TEE/optee_os/issues/4188]
> +Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
> - mk/gcc.mk | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> + mk/gcc.mk | 6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mk/gcc.mk b/mk/gcc.mk
> -index adc77a24..e238b9f3 100644
> +index adc77a24..81bfa78a 100644
> --- a/mk/gcc.mk
> +++ b/mk/gcc.mk
> -@@ -13,7 +13,7 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \
> +@@ -13,11 +13,11 @@ nostdinc$(sm) := -nostdinc -isystem $(shell $(CC$(sm)) \
> -print-file-name=include 2> /dev/null)
>
> # Get location of libgcc from gcc
> -libgcc$(sm) := $(shell $(CC$(sm)) $(CFLAGS$(arch-bits-$(sm))) \
> +libgcc$(sm) := $(shell $(CC$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CFLAGS$(arch-bits-$(sm))) \
> -print-libgcc-file-name 2> /dev/null)
> - libstdc++$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
> +-libstdc++$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
> ++libstdc++$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
> -print-file-name=libstdc++.a 2> /dev/null)
> +-libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
> ++libgcc_eh$(sm) := $(shell $(CXX$(sm)) $(LIBGCC_LOCATE_CFLAGS) $(CXXFLAGS$(arch-bits-$(sm))) $(comp-cxxflags$(sm)) \
> + -print-file-name=libgcc_eh.a 2> /dev/null)
> +
> + # Define these to something to discover accidental use
> --
> 2.25.1
>
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [meta-arm] [PATCH 4/7] arm/optee-client: rewrite recipe
2020-11-02 15:33 ` [PATCH 4/7] arm/optee-client: rewrite recipe Ross Burton
@ 2020-11-04 1:18 ` Denys Dmytriyenko
2020-11-04 11:39 ` Ross Burton
0 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-11-04 1:18 UTC (permalink / raw)
To: Ross Burton; +Cc: meta-arm
On Mon, Nov 02, 2020 at 03:33:38PM +0000, Ross Burton wrote:
> The license is 2-clause BSD, so specify that precisely.
>
> No need to inherit python3native as it is not used.
>
> Instead of using the bare Makefile build, use CMake.
>
> Change-Id: I324f633428f10fdaabaa57b2f2561c2fdc847919
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
> .../recipes-security/optee/optee-client.inc | 35 +++----------------
> 1 file changed, 5 insertions(+), 30 deletions(-)
>
> diff --git a/meta-arm/recipes-security/optee/optee-client.inc b/meta-arm/recipes-security/optee/optee-client.inc
> index d82392c..26f9724 100644
> --- a/meta-arm/recipes-security/optee/optee-client.inc
> +++ b/meta-arm/recipes-security/optee/optee-client.inc
> @@ -2,12 +2,10 @@ SUMMARY = "OP-TEE Client API"
> DESCRIPTION = "Open Portable Trusted Execution Environment - Normal World Client side of the TEE"
> HOMEPAGE = "https://www.op-tee.org/"
>
> -LICENSE = "BSD"
> -LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=69663ab153298557a59c67a60a743e5b"
> +LICENSE = "BSD-2-Clause"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=69663ab153298557a59c67a60a743e5b"
>
> -require optee.inc
Was this a mistake?
> -
> -inherit python3native systemd update-rc.d
> +inherit systemd update-rc.d cmake
>
> SRC_URI = " \
> git://github.com/OP-TEE/optee_client.git \
> @@ -16,31 +14,11 @@ SRC_URI = " \
> "
>
> S = "${WORKDIR}/git"
> -B = "${WORKDIR}/build"
> -
> -EXTRA_OEMAKE = "O=${B}"
> -
> -do_compile() {
> - cd ${S}
> - oe_runmake
> -}
> -do_compile[cleandirs] = "${B}"
> -
> -do_install() {
> - cd ${S}
> - oe_runmake install
> -
> - install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${sbindir}/tee-supplicant
>
> - install -D -p -m0644 ${B}/export/usr/lib/libteec.so.1.0 ${D}${libdir}/libteec.so.1.0
> - ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so
> - ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so.1
> -
> - install -d ${D}${includedir}
> - install -p -m0644 ${B}/export/usr/include/*.h ${D}${includedir}
> +EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON"
>
> +do_install_append() {
> install -D -p -m0644 ${WORKDIR}/tee-supplicant.service ${D}${systemd_system_unitdir}/tee-supplicant.service
> -
> install -D -p -m0755 ${WORKDIR}/tee-supplicant.sh ${D}${sysconfdir}/init.d/tee-supplicant
>
> sed -i -e s:@sysconfdir@:${sysconfdir}:g \
> @@ -52,8 +30,5 @@ do_install() {
> SYSTEMD_SERVICE_${PN} = "tee-supplicant.service"
>
> INITSCRIPT_PACKAGES = "${PN}"
> -
> INITSCRIPT_NAME_${PN} = "tee-supplicant"
> INITSCRIPT_PARAMS_${PN} = "start 10 1 2 3 4 5 . stop 90 0 6 ."
> -
> -
> --
> 2.25.1
>
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [meta-arm] [PATCH 7/7] arm/optee: consolidate common variables
2020-11-02 15:33 ` [PATCH 7/7] arm/optee: consolidate common variables Ross Burton
@ 2020-11-04 1:18 ` Denys Dmytriyenko
2020-11-04 11:40 ` Ross Burton
0 siblings, 1 reply; 12+ messages in thread
From: Denys Dmytriyenko @ 2020-11-04 1:18 UTC (permalink / raw)
To: Ross Burton; +Cc: meta-arm
On Mon, Nov 02, 2020 at 03:33:41PM +0000, Ross Burton wrote:
> Move a number of shared varibles into optee.inc so that they don't have
> to be duplicated repeatedly.
>
> Change-Id: Ie2565dfa66cbd61aad199224a4cdc7b2e1af0c5d
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
> .../recipes-security/optee/optee-examples.inc | 17 +++------------
> meta-arm/recipes-security/optee/optee-os.inc | 14 +------------
> .../recipes-security/optee/optee-test.inc | 16 +++-----------
> meta-arm/recipes-security/optee/optee.inc | 21 +++++++++++++++++++
> 4 files changed, 28 insertions(+), 40 deletions(-)
>
> diff --git a/meta-arm/recipes-security/optee/optee-examples.inc b/meta-arm/recipes-security/optee/optee-examples.inc
> index 73193f5..851043b 100644
> --- a/meta-arm/recipes-security/optee/optee-examples.inc
> +++ b/meta-arm/recipes-security/optee/optee-examples.inc
> @@ -15,26 +15,15 @@ SRC_URI = "git://github.com/linaro-swg/optee_examples.git \
> file://0001-make-Pass-ldflags-during-link.patch \
> "
>
> -OPTEE_COMPILER = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
> -
> -EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
> - OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \
> - TEEC_EXPORT=${TEEC_EXPORT} \
> - HOST_CROSS_COMPILE=${TARGET_PREFIX} \
> - LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
> - COMPILER=${OPTEE_COMPILER} \
> - TA_CROSS_COMPILE=${TARGET_PREFIX} \
> - V=1 \
> +EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
> + HOST_CROSS_COMPILE=${HOST_PREFIX} \
> + TA_CROSS_COMPILE=${HOST_PREFIX} \
> OUTPUT_DIR=${B} \
> "
>
> S = "${WORKDIR}/git"
> B = "${WORKDIR}/build"
>
> -OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}"
> -TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
> -TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
> -
> do_compile() {
> oe_runmake -C ${S}
> }
> diff --git a/meta-arm/recipes-security/optee/optee-os.inc b/meta-arm/recipes-security/optee/optee-os.inc
> index e513fcc..ea6c496 100644
> --- a/meta-arm/recipes-security/optee/optee-os.inc
> +++ b/meta-arm/recipes-security/optee/optee-os.inc
> @@ -17,25 +17,13 @@ SRC_URI = "git://github.com/OP-TEE/optee_os.git"
> S = "${WORKDIR}/git"
> B = "${WORKDIR}/build"
>
> -OPTEEMACHINE ?= "${MACHINE}"
> -OPTEEMACHINE_aarch64_qemuall ?= "vexpress-qemu_armv8a"
> -OPTEE_ARCH = "null"
> -OPTEE_ARCH_armv7a = "arm32"
> -OPTEE_ARCH_aarch64 = "arm64"
> -OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}"
> -OPTEE_COMPILER = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
> -
> -
> -EXTRA_OEMAKE = " \
> +EXTRA_OEMAKE += " \
> PLATFORM=${OPTEEMACHINE} \
> CFG_${OPTEE_CORE}_core=y \
> CROSS_COMPILE_core=${HOST_PREFIX} \
> CROSS_COMPILE_ta_${OPTEE_ARCH}=${HOST_PREFIX} \
> NOWERROR=1 \
> - V=1 \
I noticed verbose building got disabled - any specific reasons?
> ta-targets=ta_${OPTEE_ARCH} \
> - LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
> - COMPILER=${OPTEE_COMPILER} \
> O=${B} \
> "
>
> diff --git a/meta-arm/recipes-security/optee/optee-test.inc b/meta-arm/recipes-security/optee/optee-test.inc
> index 95ed311..467e687 100644
> --- a/meta-arm/recipes-security/optee/optee-test.inc
> +++ b/meta-arm/recipes-security/optee/optee-test.inc
> @@ -19,19 +19,9 @@ SRC_URI = "git://github.com/OP-TEE/optee_test.git \
> S = "${WORKDIR}/git"
> B = "${WORKDIR}/build"
>
> -OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}"
> -TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
> -TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
> -OPTEE_COMPILER = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
> -
> -EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
> - OPTEE_CLIENT_EXPORT=${OPTEE_CLIENT_EXPORT} \
> - TEEC_EXPORT=${TEEC_EXPORT} \
> - LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
> - COMPILER=${OPTEE_COMPILER} \
> - CROSS_COMPILE_HOST=${TARGET_PREFIX} \
> - CROSS_COMPILE_TA=${TARGET_PREFIX} \
> - V=1 \
> +EXTRA_OEMAKE += "TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
> + CROSS_COMPILE_HOST=${HOST_PREFIX} \
> + CROSS_COMPILE_TA=${HOST_PREFIX} \
> O=${B} \
> "
>
> diff --git a/meta-arm/recipes-security/optee/optee.inc b/meta-arm/recipes-security/optee/optee.inc
> index 4bf87fe..8aaf616 100644
> --- a/meta-arm/recipes-security/optee/optee.inc
> +++ b/meta-arm/recipes-security/optee/optee.inc
> @@ -1,3 +1,24 @@
> COMPATIBLE_MACHINE ?= "invalid"
> COMPATIBLE_MACHINE_qemuarm64 ?= "qemuarm64"
> # Please add supported machines below or set it in .bbappend or .conf
> +
> +OPTEEMACHINE ?= "${MACHINE}"
> +OPTEEMACHINE_aarch64_qemuall ?= "vexpress-qemu_armv8a"
> +
> +OPTEE_ARCH = "null"
> +OPTEE_ARCH_armv7a = "arm32"
> +OPTEE_ARCH_aarch64 = "arm64"
> +OPTEE_CORE = "${@d.getVar('OPTEE_ARCH').upper()}"
> +
> +OPTEE_COMPILER = "${@d.getVar('TOOLCHAIN') or 'gcc'}"
> +
> +# Set here but not passed to EXTRA_OEMAKE by default as that breaks
> +# the optee-os build
> +TA_DEV_KIT_DIR = "${STAGING_INCDIR}/optee/export-user_ta"
> +
> +EXTRA_OEMAKE += "V=1 \
> + LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
> + COMPILER=${OPTEE_COMPILER} \
> + OPTEE_CLIENT_EXPORT=${STAGING_DIR_HOST}${prefix} \
> + TEEC_EXPORT=${STAGING_DIR_HOST}${prefix} \
> + "
> --
> 2.25.1
>
>
>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [meta-arm] [PATCH 4/7] arm/optee-client: rewrite recipe
2020-11-04 1:18 ` [meta-arm] " Denys Dmytriyenko
@ 2020-11-04 11:39 ` Ross Burton
0 siblings, 0 replies; 12+ messages in thread
From: Ross Burton @ 2020-11-04 11:39 UTC (permalink / raw)
To: Denys Dmytriyenko; +Cc: meta-arm
On Wed, 4 Nov 2020 at 01:18, Denys Dmytriyenko <denis@denix.org> wrote:
> > -require optee.inc
>
> Was this a mistake?
No, the client library is sufficiently different that optee.inc
doesn't bring any gains.
Ross
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [meta-arm] [PATCH 7/7] arm/optee: consolidate common variables
2020-11-04 1:18 ` [meta-arm] " Denys Dmytriyenko
@ 2020-11-04 11:40 ` Ross Burton
0 siblings, 0 replies; 12+ messages in thread
From: Ross Burton @ 2020-11-04 11:40 UTC (permalink / raw)
To: Denys Dmytriyenko; +Cc: meta-arm
On Wed, 4 Nov 2020 at 01:18, Denys Dmytriyenko <denis@denix.org> wrote:
> > -EXTRA_OEMAKE = " \
> > +EXTRA_OEMAKE += " \
> > PLATFORM=${OPTEEMACHINE} \
> > CFG_${OPTEE_CORE}_core=y \
> > CROSS_COMPILE_core=${HOST_PREFIX} \
> > CROSS_COMPILE_ta_${OPTEE_ARCH}=${HOST_PREFIX} \
> > NOWERROR=1 \
> > - V=1 \
>
> I noticed verbose building got disabled - any specific reasons?
See optee.inc:
> > +EXTRA_OEMAKE += "V=1 \
Ross
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-11-04 11:40 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-02 15:33 [PATCH 1/7] arm/optee-os: improve sysroot lookup Ross Burton
2020-11-02 15:33 ` [PATCH 2/7] arm/optee-test: add bug links Ross Burton
2020-11-02 15:33 ` [PATCH 3/7] arm/optee-os: fix the optee-test build with GCC 10 Ross Burton
2020-11-02 15:33 ` [PATCH 4/7] arm/optee-client: rewrite recipe Ross Burton
2020-11-04 1:18 ` [meta-arm] " Denys Dmytriyenko
2020-11-04 11:39 ` Ross Burton
2020-11-02 15:33 ` [PATCH 5/7] arm/optee-examples: cleanup recipe Ross Burton
2020-11-02 15:33 ` [PATCH 6/7] arm/optee-os: " Ross Burton
2020-11-02 15:33 ` [PATCH 7/7] arm/optee: consolidate common variables Ross Burton
2020-11-04 1:18 ` [meta-arm] " Denys Dmytriyenko
2020-11-04 11:40 ` Ross Burton
2020-11-03 2:10 ` [meta-arm] [PATCH 1/7] arm/optee-os: improve sysroot lookup Jon Mason
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.