Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/optee-client: fix build with kernel < 4.16
@ 2024-01-06  9:35 Fabrice Fontaine
  2024-01-13 10:36 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2024-01-06  9:35 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine, Etienne Carriere

Fix the following build failure with kernel < 4.16 raised since bump to
version 4.0.0 in commit 8a8fa2006846cd3480741f03372e17fedb811898 and
https://github.com/OP-TEE/optee_client/commit/3ac968ee7c927271e83ea3a4247839649202ab5e:

/home/buildroot/autobuild/instance-3/output-1/build/optee-client-4.0.0/tee-supplicant/src/tee_supplicant.c: In function 'register_local_shm':
/home/buildroot/autobuild/instance-3/output-1/build/optee-client-4.0.0/tee-supplicant/src/tee_supplicant.c:356:44: error: storage size of 'data' isn't known
  356 |         struct tee_ioctl_shm_register_data data;
      |                                            ^~~~

Fixes:
 - http://autobuild.buildroot.org/results/d63eb7c8574366377760f5ab2eaec02f46173975

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...upplicant-fix-build-with-kernel-4.16.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 package/optee-client/0001-tee-supplicant-fix-build-with-kernel-4.16.patch

diff --git a/package/optee-client/0001-tee-supplicant-fix-build-with-kernel-4.16.patch b/package/optee-client/0001-tee-supplicant-fix-build-with-kernel-4.16.patch
new file mode 100644
index 0000000000..fa51bd5d5e
--- /dev/null
+++ b/package/optee-client/0001-tee-supplicant-fix-build-with-kernel-4.16.patch
@@ -0,0 +1,56 @@
+From acc5aec37f5f246ebf185d2129e7630eb80bb388 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Fri, 5 Jan 2024 09:47:43 +0100
+Subject: [PATCH] tee-supplicant: fix build with kernel < 4.16
+
+Commit 3ac968ee7c927271e83ea3a4247839649202ab5e moved linux/tee.h from
+libteec/include to libteec/src resulting in the following build failure
+with any kernel < 4.16 (i.e before
+https://github.com/torvalds/linux/commit/033ddf12bcf5326b93bd604f50a7474a434a35f9):
+
+/home/buildroot/autobuild/instance-3/output-1/build/optee-client-4.0.0/tee-supplicant/src/tee_supplicant.c: In function 'register_local_shm':
+/home/buildroot/autobuild/instance-3/output-1/build/optee-client-4.0.0/tee-supplicant/src/tee_supplicant.c:356:44: error: storage size of 'data' isn't known
+  356 |         struct tee_ioctl_shm_register_data data;
+      |                                            ^~~~
+
+To fix this build failure, update CMakeLists.txt and Makefile of
+tee-supplicant to add libteec/src to the include directories.
+
+Fixes: 3ac968ee7c92 ("Makefile, cmake: move teec related headers")
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://github.com/OP-TEE/optee_client/pull/369
+---
+ tee-supplicant/CMakeLists.txt | 5 ++++-
+ tee-supplicant/Makefile       | 2 +-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/tee-supplicant/CMakeLists.txt b/tee-supplicant/CMakeLists.txt
+index 31c6dac5..b44e9e95 100644
+--- a/tee-supplicant/CMakeLists.txt
++++ b/tee-supplicant/CMakeLists.txt
+@@ -93,7 +93,10 @@ endif()
+ ################################################################################
+ # Public and private header and library dependencies
+ ################################################################################
+-target_include_directories(${PROJECT_NAME} PRIVATE src)
++target_include_directories(${PROJECT_NAME}
++	PRIVATE src
++	PRIVATE ../libteec/src
++)
+ 
+ target_link_libraries(${PROJECT_NAME}
+ 	PRIVATE teec
+diff --git a/tee-supplicant/Makefile b/tee-supplicant/Makefile
+index 06c4b2e5..c3b32252 100644
+--- a/tee-supplicant/Makefile
++++ b/tee-supplicant/Makefile
+@@ -40,7 +40,7 @@ TEES_OBJ_DIR	:= $(OUT_DIR)
+ TEES_OBJS 	:= $(patsubst %.c,$(TEES_OBJ_DIR)/%.o, $(TEES_SRCS))
+ TEES_INCLUDES 	:= ${CURDIR}/../libteec/include \
+ 		   ${CURDIR}/src \
+-		   ${CURDIR}/../libteec/include \
++		   ${CURDIR}/../libteec/src \
+ 
+ TEES_CFLAGS	:= $(addprefix -I, $(TEES_INCLUDES)) $(CFLAGS) \
+ 		   -DDEBUGLEVEL_$(CFG_TEE_SUPP_LOG_LEVEL) \
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/optee-client: fix build with kernel < 4.16
  2024-01-06  9:35 [Buildroot] [PATCH 1/1] package/optee-client: fix build with kernel < 4.16 Fabrice Fontaine
@ 2024-01-13 10:36 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2024-01-13 10:36 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Etienne Carriere, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > Fix the following build failure with kernel < 4.16 raised since bump to
 > version 4.0.0 in commit 8a8fa2006846cd3480741f03372e17fedb811898 and
 > https://github.com/OP-TEE/optee_client/commit/3ac968ee7c927271e83ea3a4247839649202ab5e:

 > /home/buildroot/autobuild/instance-3/output-1/build/optee-client-4.0.0/tee-supplicant/src/tee_supplicant.c: In function 'register_local_shm':
 > /home/buildroot/autobuild/instance-3/output-1/build/optee-client-4.0.0/tee-supplicant/src/tee_supplicant.c:356:44: error: storage size of 'data' isn't known
 >   356 |         struct tee_ioctl_shm_register_data data;
 >       |                                            ^~~~

 > Fixes:
 >  - http://autobuild.buildroot.org/results/d63eb7c8574366377760f5ab2eaec02f46173975

 > Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Committed to 2023.11.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-13 10:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-06  9:35 [Buildroot] [PATCH 1/1] package/optee-client: fix build with kernel < 4.16 Fabrice Fontaine
2024-01-13 10:36 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox