Skip to contentSkip to conversation

multiprocmgr: do not mix kernel and user-space headers, fully depend on uapi

PATCH New Denys Dmytriyenko 1 participant 1 message Feb 11, 2020 Broadcom iproc Arm architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multiprocmgr: do not mix kernel and user-space headers, fully depend on uapi

From: Denys Dmytriyenko <[email protected]>

As multiprocmgr is a user-space app and should only use uapi headers, drop extra -I for the kernel headers. Patch out any assumptions of direct access to the kernel headers.

---
 ...on-t-suppress-kernel-linux-types.h-inclus.patch | 28 ++++++++++++++++++++++
 recipes-ti/multiprocmgr/multiprocmgr_git.bb        |  3 +--
 2 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 recipes-ti/multiprocmgr/multiprocmgr/0001-mpmdlif.c-don-t-suppress-kernel-linux-types.h-inclus.patch
recipes-ti/multiprocmgr/multiprocmgr/0001-mpmdlif.c-don-t-suppress-kernel-linux-types.h-inclus.patch new file +28 -0
new file mode 100644
index 0000000..c3315cf
@@ -0,0 +1,28 @@
+From 95921ccf77ae037bb3b95f45a632f60975c6c9bb Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <[email protected]>
+Date: Tue, 11 Feb 2020 17:03:18 -0500
+Subject: [PATCH] mpmdlif.c: don't suppress kernel <linux/types.h> inclusion
+
+Defining _LINUX_TYPES_H before including <linux/keystone_remoteproc.h> causes
+<linux/types.h> to skip defining kernel types, resulting in undefined __u32
+
+Signed-off-by: Denys Dmytriyenko <[email protected]>
+---
+ src/daemon/mpmdlif.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/daemon/mpmdlif.c b/src/daemon/mpmdlif.c
+index 0c31604..1abd00f 100644
+--- a/src/daemon/mpmdlif.c
++++ b/src/daemon/mpmdlif.c
+@@ -46,7 +46,6 @@
+ #include <byteswap.h>
+ #include <stdint.h>
+ 
+-#define _LINUX_TYPES_H
+ #include "linux/keystone_remoteproc.h"
+ #include "internal/rsc_types.h"
+ //#include <elf.h>
+-- 
+2.7.4
+
recipes-ti/multiprocmgr/multiprocmgr_git.bb +1 -2
index 6143341..aea2445 100644
@@ -6,6 +6,7 @@ include multiprocmgr.inc
 SRC_URI += " \
 	file://mpmsrv-daemon.service \
 	file://0001-mpmdlif.c-don-t-hardcode-kernel-s-uapi-location-keys.patch \
+	file://0001-mpmdlif.c-don-t-suppress-kernel-linux-types.h-inclus.patch \
 "
 
 PR = "${INC_PR}.2"
@@ -14,8 +15,6 @@ DEPENDS = "mpm-transport libdaemon virtual/kernel cmem"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-CC += "-I${STAGING_KERNEL_DIR}/include -I${STAGING_KERNEL_DIR}/include/uapi"
-
 INITSCRIPT_NAME = "mpmsrv-daemon.sh"
 INITSCRIPT_PARAMS = "defaults 10"
 
Signature · 1 line
2.7.4