summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-10-30 12:09:28 +0100
committerKoen Kooi <koen@openembedded.org>2008-10-30 12:09:28 +0100
commitdb3b63202106159a4a3113eefc836589debdacff (patch)
treea7b8724f1236070ea86ad5ef62a048194b5b4318
parent39430f1c3b573bb86abb455d2d8355a4e6214344 (diff)
ti-cmemk-module, codec-engine: add patch to fix builds with >=2.6.26 and class_device_* API change
-rw-r--r--packages/dsplink/codec-engine_2.21.bb16
-rw-r--r--packages/dsplink/files/cmemk-fix-class-device-api.diff89
-rw-r--r--packages/dsplink/ti-cmemk-module_2.21.bb19
3 files changed, 94 insertions, 30 deletions
diff --git a/packages/dsplink/codec-engine_2.21.bb b/packages/dsplink/codec-engine_2.21.bb
index caaf297c9f..b300256a3a 100644
--- a/packages/dsplink/codec-engine_2.21.bb
+++ b/packages/dsplink/codec-engine_2.21.bb
@@ -15,7 +15,8 @@ PV = "221"
SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_21_00_06.tar.gz \
file://Makefile.dsplink \
- "
+ file://cmemk-fix-class-device-api.diff;patch=1 \
+"
S = "${WORKDIR}/codec_engine_2_21_00_06"
@@ -65,19 +66,6 @@ do_compile() {
cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem
oe_runmake clean
- # We probably don't need to build all 3, but atm it doesn't hurt us
- oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
- KERNEL_SRC=${STAGING_KERNEL_DIR} \
- KERNEL_VERSION=${KERNEL_VERSION} \
- CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
- AR="${KERNEL_AR}" \
- release
- oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
- KERNEL_SRC=${STAGING_KERNEL_DIR} \
- KERNEL_VERSION=${KERNEL_VERSION} \
- CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
- AR="${KERNEL_AR}" \
- debug
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
KERNEL_SRC=${STAGING_KERNEL_DIR} \
KERNEL_VERSION=${KERNEL_VERSION} \
diff --git a/packages/dsplink/files/cmemk-fix-class-device-api.diff b/packages/dsplink/files/cmemk-fix-class-device-api.diff
new file mode 100644
index 0000000000..c42e6ae927
--- /dev/null
+++ b/packages/dsplink/files/cmemk-fix-class-device-api.diff
@@ -0,0 +1,89 @@
+--- codec_engine_2_21_00_06/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2008-09-26 02:26:04.000000000 +0200
++++ codec_engine_2_21_00_06/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2008-10-30 11:57:54.000000000 +0100
+@@ -42,11 +26,20 @@
+ * USE_CLASS_SIMPLE - #define if Linux version contains class_simple,
+ * otherwise class is used (Linux supports one or the other, not both)
+ */
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+
+-#warning LINUX_VERSION_CODE >= 2.6.18
++#warning LINUX_VERSION_CODE >= 2.6.26
++
++#define USE_CACHE_VOID_ARG
++#undef USE_CLASS_DEVICE
++#undef USE_CLASS_SIMPLE
++
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
++
++#warning 2.6.26 > LINUX_VERSION_CODE >= 2.6.18
+
+ #define USE_CACHE_VOID_ARG
++#define USE_CLASS_DEVICE
+ #undef USE_CLASS_SIMPLE
+
+ #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) */
+@@ -54,6 +47,7 @@
+ #warning LINUX_VERSION_CODE < 2.6.18
+
+ #define USE_CLASS_SIMPLE
++#undef USE_CLASS_DEVICE
+ #undef USE_CACHE_VOID_ARG
+
+ #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) */
+@@ -1697,12 +1691,12 @@
+ #ifdef USE_CLASS_SIMPLE
+ class_simple_device_add(cmem_class, MKDEV(cmem_major, 0), NULL, "cmem");
+ #else
+-/*
+- Use the following for newer GIT releases ( > 2.6.25?)
+- device_create(cmem_class, NULL, MKDEV(cmem_major, 0), "cmem");
+-*/
++#ifdef USE_CLASS_DEVICE
+ class_device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem");
+-#endif
++#else
++ device_create(cmem_class, NULL, MKDEV(cmem_major, 0), "cmem");
++#endif // USE_CLASS_DEVICE
++#endif // USE_CLASS_SIMPLE
+ #endif // USE_UDEV
+
+ pstart[0] = phys_start;
+@@ -1862,13 +1856,13 @@
+ class_simple_device_remove(MKDEV(cmem_major, 0));
+ class_simple_destroy(cmem_class);
+ #else
+-/*
+- Use the following for newer GIT releases ( > 2.6.25?)
+- device_destroy(cmem_class, MKDEV(cmem_major, 0));
+-*/
++#ifdef USE_CLASS_DEVICE
+ class_device_destroy(cmem_class, MKDEV(cmem_major, 0));
++#else
++ device_destroy(cmem_class, MKDEV(cmem_major, 0));
++#endif // USE_CLASS_DEVICE
+ class_destroy(cmem_class);
+-#endif
++#endif // USE_CLASS_SIMPLE
+
+ #endif // USE_UDEV
+
+@@ -1938,13 +1932,13 @@
+ class_simple_device_remove(MKDEV(cmem_major, 0));
+ class_simple_destroy(cmem_class);
+ #else
+-/*
+- Use the following for newer GIT releases ( > 2.6.25?)
+- device_destroy(cmem_class, MKDEV(cmem_major, 0));
+-*/
++#ifdef USE_CLASS_DEVICE
+ class_device_destroy(cmem_class, MKDEV(cmem_major, 0));
++#else
++ device_destroy(cmem_class, MKDEV(cmem_major, 0));
++#endif // USE_CLASS_DEVICE
+ class_destroy(cmem_class);
+-#endif
++#endif // USE_CLASS_SIMPLE
+
+ #endif // USE_UDEV
+
diff --git a/packages/dsplink/ti-cmemk-module_2.21.bb b/packages/dsplink/ti-cmemk-module_2.21.bb
index 82e5fb61e4..4261b140d2 100644
--- a/packages/dsplink/ti-cmemk-module_2.21.bb
+++ b/packages/dsplink/ti-cmemk-module_2.21.bb
@@ -15,7 +15,8 @@ PV = "221"
SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_21_00_06.tar.gz \
file://Makefile.dsplink \
- "
+ file://cmemk-fix-class-device-api.diff;patch=1 \
+"
S = "${WORKDIR}/codec_engine_2_21_00_06"
@@ -37,25 +38,11 @@ do_compile() {
cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem
oe_runmake clean
- # We probably don't need to build all 3, but atm it doesn't hurt us
oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
KERNEL_SRC=${STAGING_KERNEL_DIR} \
KERNEL_VERSION=${KERNEL_VERSION} \
CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
- AR="${KERNEL_AR}" \
- release
- oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
- KERNEL_SRC=${STAGING_KERNEL_DIR} \
- KERNEL_VERSION=${KERNEL_VERSION} \
- CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
- AR="${KERNEL_AR}" \
- debug
- oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
- KERNEL_SRC=${STAGING_KERNEL_DIR} \
- KERNEL_VERSION=${KERNEL_VERSION} \
- CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
- AR="${KERNEL_AR}"
-
+ AR="${KERNEL_AR}"
}