[oe-commits] Koen Kooi : ti-linuxutils 2.25.05.11: fix build with recent kernels

git version control git at git.openembedded.org
Mon Dec 6 12:52:47 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: d0184be13b4879e982f820baf6473162c8f038af
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=d0184be13b4879e982f820baf6473162c8f038af

Author: Koen Kooi <koen at openembedded.org>
Date:   Sun Dec  5 18:51:59 2010 +0100

ti-linuxutils 2.25.05.11: fix build with recent kernels

Signed-off-by: Koen Kooi <k-kooi at ti.com>

---

 recipes/ti/ti-dmai_svn.bb                         |    3 +
 recipes/ti/ti-linuxutils/linuxutils-BKL-fix.patch |   73 +++++++++++++++++++++
 recipes/ti/ti-linuxutils_2.25.05.11.bb            |    2 +
 3 files changed, 78 insertions(+), 0 deletions(-)

diff --git a/recipes/ti/ti-dmai_svn.bb b/recipes/ti/ti-dmai_svn.bb
index a49febc..de86b18 100644
--- a/recipes/ti/ti-dmai_svn.bb
+++ b/recipes/ti/ti-dmai_svn.bb
@@ -1,5 +1,8 @@
 require ti-dmai.inc
 
+# Hack to be able to use recent kernel headers from userspace
+TARGET_CC_ARCH += " -D__EXPORTED_HEADERS__"
+
 DEFAULT_PREFERENCE = "-1"
 
 PV = "2_10_00_01+svnr${SRCPV}"
diff --git a/recipes/ti/ti-linuxutils/linuxutils-BKL-fix.patch b/recipes/ti/ti-linuxutils/linuxutils-BKL-fix.patch
new file mode 100644
index 0000000..29b0a44
--- /dev/null
+++ b/recipes/ti/ti-linuxutils/linuxutils-BKL-fix.patch
@@ -0,0 +1,73 @@
+From: Koen Kooi <k-kooi at ti.com>
+Subject: linuxutils: fix build with 2.6.37rcX
+
+---
+
+--- /tmp/cmemk.c	2010-12-05 18:41:00.000000000 +0100
++++ linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c	2010-12-05 18:43:24.000000000 +0100
+@@ -31,6 +31,7 @@
+ #include <linux/seq_file.h>
+ #include <linux/vmalloc.h>
+ #include <linux/sched.h>
++#include <linux/slab.h>
+ #include <asm/cacheflush.h>
+ #include <asm/uaccess.h>
+ #include <asm/pgtable.h>
+@@ -204,7 +205,11 @@
+     "\n\t\t fall back to a heap-based allocation attempt");
+ module_param(useHeapIfPoolUnavailable, int, S_IRUGO);
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
++static DEFINE_SEMAPHORE(cmem_mutex);
++#else
+ static DECLARE_MUTEX(cmem_mutex);
++#endif
+ 
+ /* Describes a pool buffer */
+ typedef struct pool_buffer {
+@@ -243,8 +248,12 @@
+ 
+ static struct file_operations cmem_fxns = {
+     owner:   THIS_MODULE,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
++    unlocked_ioctl: ioctl,
++#else
+     ioctl:   ioctl,
+-    mmap:    mmap,
++#endif
++	mmap:    mmap,
+     open:    open,
+     release: release
+ };
+--- /tmp/sdmak.c	2010-12-05 18:43:55.000000000 +0100
++++ linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c	2010-12-05 18:48:31.000000000 +0100
+@@ -208,9 +208,12 @@
+             }
+ 
+             up_read(&current->mm->mmap_sem);
+-
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
++            sema_init(&(channels[channel].mutex),1);
++#else
+             init_MUTEX_LOCKED(&(channels[channel].mutex));
+-            channels[channel].owner = filp;
++#endif
++			channels[channel].owner = filp;
+ 
+             if (copy_to_user(argp, &channel, sizeof(channel))) {
+                 return -EFAULT;
+@@ -286,8 +289,12 @@
+ }
+ 
+ static struct file_operations fops = {
+-    .ioctl = dma_ioctl,
+-    .release = dma_release,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
++    .unlocked_ioctl = dma_ioctl,
++#else
++	.ioctl = dma_ioctl,
++#endif
++	.release = dma_release,
+     .owner = THIS_MODULE
+ };
+ 
diff --git a/recipes/ti/ti-linuxutils_2.25.05.11.bb b/recipes/ti/ti-linuxutils_2.25.05.11.bb
index 8e7817d..eccef89 100644
--- a/recipes/ti/ti-linuxutils_2.25.05.11.bb
+++ b/recipes/ti/ti-linuxutils_2.25.05.11.bb
@@ -3,6 +3,8 @@ require ti-linuxutils.inc
 PE = "1"
 PV = "2_25_05_11"
 
+SRC_URI += "file://linuxutils-BKL-fix.patch"
+
 SRC_URI[md5sum] = "f225638153f65628a0b07db50414a68a"
 SRC_URI[sha256sum] = "bf8170f36de54ecf2583c38be50b9368130b1ccb3aa9bcced3e439fb0a2ae84c"
 





More information about the Openembedded-commits mailing list