aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2015-01-06 13:43:35 -0200
committerOtavio Salvador <otavio@ossystems.com.br>2015-01-12 10:23:45 -0200
commit61aeebb34b1eaf0b10674e27378dd1e012b79cba (patch)
tree6d386ba5c21490c9a05e53f288d57afc98c44723
parent7539a694f3d01f1ab5162bfee16b0327f827c4f7 (diff)
downloadmeta-fsl-arm-61aeebb34b1eaf0b10674e27378dd1e012b79cba.tar.gz
meta-fsl-arm-61aeebb34b1eaf0b10674e27378dd1e012b79cba.tar.bz2
meta-fsl-arm-61aeebb34b1eaf0b10674e27378dd1e012b79cba.zip
kernel-module-mcc: Only include mvf_sema4.h if building in kernel
When mcc_config.h is used to make application we shouldn't include mvf_sema4.h as it is an internal symbol of kernel and shouldn't be directly referenced by user space applications using the MCC interface. This allows for application developers to use the SDK without having to copy the 'mvf_sema4.h' header byhand. More detailed information at: https://lists.yoctoproject.org/pipermail/meta-freescale/2015-January/012144.html Change-Id: I39a519d10a15b951c573007d3cf689f32aac3f30 Reported-by: Petr Kubizňák <kubiznak.petr@elnico.cz> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--recipes-kernel/kernel-module-mcc/kernel-module-mcc/mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch51
-rw-r--r--recipes-kernel/kernel-module-mcc/kernel-module-mcc_1.06.bb3
2 files changed, 53 insertions, 1 deletions
diff --git a/recipes-kernel/kernel-module-mcc/kernel-module-mcc/mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch b/recipes-kernel/kernel-module-mcc/kernel-module-mcc/mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch
new file mode 100644
index 0000000..570edaa
--- /dev/null
+++ b/recipes-kernel/kernel-module-mcc/kernel-module-mcc/mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch
@@ -0,0 +1,51 @@
+From 17e04c68557c4c9cb1a0112717019329a0cc3f96 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Tue, 6 Jan 2015 13:39:50 -0200
+Subject: [PATCH] mcc_config.h: Only include mvf_sema4.h if building in kernel
+Organization: O.S. Systems Software LTDA.
+
+When mcc_config.h is used to make application we shouldn't include
+mvf_sema4.h as it is an internal symbol of kernel and shouldn't be
+directly referenced by user space applications using the MCC
+interface.
+
+This patch puts a guard using __KERNEL__ define, avoiding the include
+and the definition of MCC_SHMEM_SEMAPHORE_NUMBER as
+MVF_SHMEM_SEMAPHORE_NUMBER would be undefined.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ mcc_config.h | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/mcc_config.h b/mcc_config.h
+index 6a12c6d..3887aad 100644
+--- a/mcc_config.h
++++ b/mcc_config.h
+@@ -18,8 +18,13 @@
+ #ifndef __MCC_CONFIG__
+ #define __MCC_CONFIG__
+
++#ifdef __KERNEL__
+ #include <linux/mvf_sema4.h>
+
++/* semaphore number */
++#define MCC_SHMEM_SEMAPHORE_NUMBER (MVF_SHMEM_SEMAPHORE_NUMBER)
++#endif
++
+ /* used OS */
+ #define MCC_OS_USED (MCC_LINUX)
+
+@@ -47,7 +52,4 @@
+ /* other cores, besides this participating in mcc */
+ #define MCC_OTHER_CORES {1}
+
+-/* semaphore number */
+-#define MCC_SHMEM_SEMAPHORE_NUMBER (MVF_SHMEM_SEMAPHORE_NUMBER)
+-
+ #endif /* __MCC_CONFIG__ */
+--
+2.1.4
+
diff --git a/recipes-kernel/kernel-module-mcc/kernel-module-mcc_1.06.bb b/recipes-kernel/kernel-module-mcc/kernel-module-mcc_1.06.bb
index b215d9c..3cd96bc 100644
--- a/recipes-kernel/kernel-module-mcc/kernel-module-mcc_1.06.bb
+++ b/recipes-kernel/kernel-module-mcc/kernel-module-mcc_1.06.bb
@@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c8959abcbbe4d6676c58eab9354019e6"
inherit module
-SRC_URI = "http://repository.timesys.com/buildsources/m/mcc-kmod/mcc-kmod-${PV}/mcc-kmod-${PV}.tar.bz2"
+SRC_URI = "http://repository.timesys.com/buildsources/m/mcc-kmod/mcc-kmod-${PV}/mcc-kmod-${PV}.tar.bz2 \
+ file://mcc_config.h-Only-include-mvf_sema4.h-if-building-in.patch"
SRC_URI[md5sum] = "d0507968592af5d8781e8bdbbb249e7d"
SRC_URI[sha256sum] = "43f834ddf9845da843c7790a307a0dbc8b04a40deed06aed7c3c99ad3a273f6c"