aboutsummaryrefslogtreecommitdiff
path: root/package/optee-client
diff options
context:
space:
mode:
Diffstat (limited to 'package/optee-client')
-rw-r--r--package/optee-client/0001-libckteec-CMakeLists.txt-fix-static-build.patch55
-rw-r--r--package/optee-client/0001-libckteec-replace-initializer.patch93
-rw-r--r--package/optee-client/optee-client.hash4
-rw-r--r--package/optee-client/optee-client.mk2
4 files changed, 96 insertions, 58 deletions
diff --git a/package/optee-client/0001-libckteec-CMakeLists.txt-fix-static-build.patch b/package/optee-client/0001-libckteec-CMakeLists.txt-fix-static-build.patch
deleted file mode 100644
index 5307c7032c..0000000000
--- a/package/optee-client/0001-libckteec-CMakeLists.txt-fix-static-build.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From dedd04034fd246c5726ad875e8207c821e9471b7 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Wed, 15 Jul 2020 00:09:21 +0200
-Subject: [PATCH] libckteec/CMakeLists.txt: fix static build
-
-Remove SHARED from add_library call to avoid the following build failure
-when the toolchain does not support shared library:
-
-[ 78%] Linking C shared library libckteec.so
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-3/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(close.os)(.eh_frame) prevents .eh_frame_hdr table being created
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-3/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(close.os)(.eh_frame) prevents .eh_frame_hdr table being created
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-3/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(close.os)(.eh_frame) prevents .eh_frame_hdr table being created
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-3/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(open64.os)(.eh_frame) prevents .eh_frame_hdr table being created
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-3/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(libc-cancellation.os)(.eh_frame) prevents .eh_frame_hdr table being created
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-3/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(libc-cancellation.os)(.eh_frame) prevents .eh_frame_hdr table being created
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-3/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(open.os)(.eh_frame) prevents .eh_frame_hdr table being created
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-3/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(open.os)(.eh_frame) prevents .eh_frame_hdr table being created
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux[ 84%] Building C object tee-supplicant/CMakeFiles/tee-supplicant.dir/src/teec_ta_load.c.o
--uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-3/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(open.os)(.eh_frame) prevents .eh_frame_hdr table being created
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: FDE encoding in /home/buildroot/autobuild/instance-3/output-1/host/microblazeel-buildroot-linux-uclibc/sysroot/usr/lib/libc.a(__syscall_fcntl.os)(.eh_frame) prevents .eh_frame_hdr table being created
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: further warnings about FDE encoding preventing .eh_frame_hdr generation dropped
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: BFD (GNU Binutils) 2.33.1 assertion fail elf32-microblaze.c:1542
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: /home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/crtbeginT.o: probably compiled without -fPIC?
-/home/buildroot/autobuild/instance-3/output-1/host/lib/gcc/microblazeel-buildroot-linux-uclibc/9.3.0/../../../../microblazeel-buildroot-linux-uclibc/bin/ld: final link failed: bad value
-collect2: error: ld returned 1 exit status
-libckteec/CMakeFiles/ckteec.dir/build.make:144: recipe for target 'libckteec/libckteec.so.0.1.0' failed
-
-This build failure is raised on version 3.9.0 since
-https://github.com/ffontaine/optee_client/commit/fa679fc6f1f0c6240513ec69c63f0f89c2c4dd99
-
-Fixes:
- - http://autobuild.buildroot.org/results/fe2d0f5a956bf23635e51258f92d9ab2e5af7941
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Upstream status: https://github.com/OP-TEE/optee_client/pull/215]
----
- libckteec/CMakeLists.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libckteec/CMakeLists.txt b/libckteec/CMakeLists.txt
-index f0e14d1..615c9fe 100644
---- a/libckteec/CMakeLists.txt
-+++ b/libckteec/CMakeLists.txt
-@@ -33,7 +33,7 @@ set (SRC
- ################################################################################
- # Built library
- ################################################################################
--add_library (ckteec SHARED ${SRC})
-+add_library (ckteec ${SRC})
-
- set_target_properties (ckteec PROPERTIES
- VERSION ${PROJECT_VERSION}
---
-2.27.0
-
diff --git a/package/optee-client/0001-libckteec-replace-initializer.patch b/package/optee-client/0001-libckteec-replace-initializer.patch
new file mode 100644
index 0000000000..21c75d142e
--- /dev/null
+++ b/package/optee-client/0001-libckteec-replace-initializer.patch
@@ -0,0 +1,93 @@
+From 4fff84cebc05a238a8fed3c66d7dcde18f9574fb Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 2 Nov 2020 08:04:14 +0100
+Subject: [PATCH] =?UTF-8?q?libckteec:=20replace=20{=C2=A0}=20initializer?=
+ =?UTF-8?q?=20by=20{=C2=A00=20}?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Replace { } initializer by { 0 } to fix the following build failure with
+gcc 4.8:
+
+libckteec/src/pkcs11_processing.c: In function 'ck_create_object':
+libckteec/src/pkcs11_processing.c:22:9: error: missing initializer for field 'buffer' of 'struct serializer' [-Werror=missing-field-initializers]
+ struct serializer obj = { };
+ ^
+
+Fixes: http://autobuild.buildroot.org/results/a3d663adb943aee814180f01d6e153b3309be962
+Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/OP-TEE/optee_client/pull/230]
+---
+ libckteec/src/pkcs11_processing.c | 4 ++--
+ libckteec/src/serialize_ck.c | 4 ++--
+ libckteec/src/serializer.c | 4 ++--
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/libckteec/src/pkcs11_processing.c b/libckteec/src/pkcs11_processing.c
+index 2eb191f5..8eebe769 100644
+--- a/libckteec/src/pkcs11_processing.c
++++ b/libckteec/src/pkcs11_processing.c
+@@ -19,7 +19,7 @@ CK_RV ck_create_object(CK_SESSION_HANDLE session, CK_ATTRIBUTE_PTR attribs,
+ CK_ULONG count, CK_OBJECT_HANDLE_PTR handle)
+ {
+ CK_RV rv = CKR_GENERAL_ERROR;
+- struct serializer obj = { };
++ struct serializer obj = { 0 };
+ size_t ctrl_size = 0;
+ TEEC_SharedMemory *ctrl = NULL;
+ TEEC_SharedMemory *out_shm = NULL;
+@@ -114,7 +114,7 @@ CK_RV ck_encdecrypt_init(CK_SESSION_HANDLE session,
+ {
+ CK_RV rv = CKR_GENERAL_ERROR;
+ TEEC_SharedMemory *ctrl = NULL;
+- struct serializer obj = { };
++ struct serializer obj = { 0 };
+ uint32_t session_handle = session;
+ uint32_t key_handle = key;
+ size_t ctrl_size = 0;
+diff --git a/libckteec/src/serialize_ck.c b/libckteec/src/serialize_ck.c
+index 1fc26ddc..0e5df90a 100644
+--- a/libckteec/src/serialize_ck.c
++++ b/libckteec/src/serialize_ck.c
+@@ -39,7 +39,7 @@ static CK_RV serialize_indirect_attribute(struct serializer *obj,
+ CK_ATTRIBUTE_PTR attr = NULL;
+ CK_ULONG count = 0;
+ CK_RV rv = CKR_GENERAL_ERROR;
+- struct serializer obj2 = { };
++ struct serializer obj2 = { 0 };
+
+ switch (attribute->type) {
+ /* These are serialized each separately */
+@@ -263,7 +263,7 @@ static CK_RV serialize_mecha_aes_iv(struct serializer *obj,
+ CK_RV serialize_ck_mecha_params(struct serializer *obj,
+ CK_MECHANISM_PTR mechanism)
+ {
+- CK_MECHANISM mecha = { };
++ CK_MECHANISM mecha = { 0 };
+ CK_RV rv = CKR_GENERAL_ERROR;
+
+ memset(obj, 0, sizeof(*obj));
+diff --git a/libckteec/src/serializer.c b/libckteec/src/serializer.c
+index 0e3df65c..d94932ba 100644
+--- a/libckteec/src/serializer.c
++++ b/libckteec/src/serializer.c
+@@ -14,7 +14,7 @@
+
+ CK_RV init_serial_object(struct serializer *obj)
+ {
+- struct pkcs11_object_head head = { };
++ struct pkcs11_object_head head = { 0 };
+
+ memset(obj, 0, sizeof(*obj));
+
+@@ -23,7 +23,7 @@ CK_RV init_serial_object(struct serializer *obj)
+
+ void finalize_serial_object(struct serializer *obj)
+ {
+- struct pkcs11_object_head head = { };
++ struct pkcs11_object_head head = { 0 };
+
+ head.attrs_size = obj->size - sizeof(head);
+ head.attrs_count = obj->item_count;
diff --git a/package/optee-client/optee-client.hash b/package/optee-client/optee-client.hash
index b08ebc38c0..d8e507dba7 100644
--- a/package/optee-client/optee-client.hash
+++ b/package/optee-client/optee-client.hash
@@ -1,4 +1,4 @@
-# From https://github.com/OP-TEE/optee_client/archive/3.9.0.tar.gz
-sha256 1b072e6be8a697656e9fe34499789bbd4132b3720f8d1b95c659e8e6c5873654 optee-client-3.9.0.tar.gz
+# From https://github.com/OP-TEE/optee_client/archive/3.11.0.tar.gz
+sha256 91f8ec191cd999ee666b6203ec376415d5dc90a8a9955f3d5fce1f48df77169b optee-client-3.11.0.tar.gz
# Locally computed
sha256 fda8385993f112d7ca61b88b54ba5b4cbeec7e43a0f9b317d5186703c1985e8f LICENSE
diff --git a/package/optee-client/optee-client.mk b/package/optee-client/optee-client.mk
index 842ba8a81a..8108fc2130 100644
--- a/package/optee-client/optee-client.mk
+++ b/package/optee-client/optee-client.mk
@@ -4,7 +4,7 @@
#
################################################################################
-OPTEE_CLIENT_VERSION = 3.9.0
+OPTEE_CLIENT_VERSION = 3.11.0
OPTEE_CLIENT_SITE = $(call github,OP-TEE,optee_client,$(OPTEE_CLIENT_VERSION))
OPTEE_CLIENT_LICENSE = BSD-2-Clause
OPTEE_CLIENT_LICENSE_FILES = LICENSE