ti-cmemk-module: add tweak to build against post header move kernel
authorKoen Kooi <koen@openembedded.org>
Thu, 11 Dec 2008 11:31:12 +0000 (12:31 +0100)
committerKoen Kooi <koen@openembedded.org>
Thu, 11 Dec 2008 11:31:12 +0000 (12:31 +0100)
packages/dsplink/cmemk.inc
packages/dsplink/files/cmemk-class-device-27.diff [new file with mode: 0644]

index 1b7ea3a..2d9a25a 100644 (file)
@@ -11,6 +11,7 @@ export DSPLINK="${S}/cetools/packages/dsplink"
 
 PARALLEL_MAKE = ""
 
+SRC_URI += "file://cmemk-class-device-27.diff"
 
 do_compile_append() {
        echo "MVTOOL_PREFIX=${TARGET_PREFIX}" > ${S}/Rules.make         
@@ -22,6 +23,12 @@ do_compile_append() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS  
        cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem
 
+       # This sadly breaks doing -c compile more than once, but I don't have a better solution 
+       if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 26 ] ; then
+               patch -p0 < ${WORKDIR}/cmemk-class-device-27.diff
+       fi
+
+       
        oe_runmake clean
        oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
            KERNEL_SRC=${STAGING_KERNEL_DIR}    \
diff --git a/packages/dsplink/files/cmemk-class-device-27.diff b/packages/dsplink/files/cmemk-class-device-27.diff
new file mode 100644 (file)
index 0000000..1c51323
--- /dev/null
@@ -0,0 +1,11 @@
+--- /tmp/cmemk.c       2008-12-11 12:21:22.000000000 +0100
++++ src/module/cmemk.c 2008-12-11 12:22:39.000000000 +0100
+@@ -1710,7 +1710,7 @@
+ #ifdef USE_CLASS_DEVICE
+     class_device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem");
+ #else
+-    device_create(cmem_class, NULL, MKDEV(cmem_major, 0), "cmem");
++    device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem");
+ #endif // USE_CLASS_DEVICE
+ #endif // USE_CLASS_SIMPLE
+ #endif // USE_UDEV