summaryrefslogtreecommitdiffstats
path: root/recipes-ti/linuxutils
diff options
context:
space:
mode:
authorEnrico Butera <ebutera@users.berlios.de>2011-08-06 13:02:30 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-08-16 09:46:06 +0200
commite32f2b80be99d999fddfb1673dd014f70805048b (patch)
tree33c57fa5a4318d41a3b84bc46fd9cb61010921d4 /recipes-ti/linuxutils
parent3242ac8f0aa57039141dab9c58a9703215c46539 (diff)
downloadmeta-ti-e32f2b80be99d999fddfb1673dd014f70805048b.tar.gz
import codec engine and dependencies from oe classic
Signed-off-by: Enrico Butera <ebutera@users.berlios.de> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-ti/linuxutils')
-rw-r--r--recipes-ti/linuxutils/ti-linuxutils.inc90
-rw-r--r--recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix-2.patch22
-rw-r--r--recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch73
-rw-r--r--recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb10
4 files changed, 195 insertions, 0 deletions
diff --git a/recipes-ti/linuxutils/ti-linuxutils.inc b/recipes-ti/linuxutils/ti-linuxutils.inc
new file mode 100644
index 00000000..2492b5c6
--- /dev/null
+++ b/recipes-ti/linuxutils/ti-linuxutils.inc
@@ -0,0 +1,90 @@
1DESCRIPTION = "MFP Linux utils for TI ARM/DSP processors"
2SECTION = "devel"
3LICENSE = "GPLv2,BSD"
4
5BASE_SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/linuxutils/${PV}/exports"
6SRC_URI = "${BASE_SRC_URI}/linuxutils_${PV}.tar.gz "
7
8LIC_FILES_CHKSUM = "file://gpl_2.0.txt;md5=1298794fc2eed3df92a89f3c9d317440"
9
10S = "${WORKDIR}/linuxutils_${PV}"
11
12require recipes-ti/includes/ti-paths.inc
13require recipes-ti/includes/ti-staging.inc
14
15#This is a kernel module, don't set PR directly
16MACHINE_KERNEL_PR_append = "d"
17
18inherit module
19
20do_compile() {
21 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
22
23 case ${SOC_FAMILY} in
24 dm365)
25 modules="cmem edma irq";;
26 omap3)
27 modules="cmem sdma";;
28 dm355)
29 modules="cmem edma irq";;
30 *)
31 modules="cmem"
32 esac
33
34 for module in $modules ; do
35 cd ${S}/packages/ti/sdo/linuxutils/$module
36 make \
37 LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
38 MVTOOL_PREFIX="${TARGET_PREFIX}" \
39 UCTOOL_PREFIX="${TARGET_PREFIX}" \
40 clean debug release
41 done
42}
43
44do_install () {
45 install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
46 # Install CMEM
47 for module in $(find ${S}/packages/ti/sdo/linuxutils/ -name "*.ko") ; do
48 install -m 0755 $module ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
49 done
50 cd ${S}/packages/ti/sdo/linuxutils/cmem/apps
51 make \
52 LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
53 MVTOOL_PREFIX="${TARGET_PREFIX}" \
54 UCTOOL_PREFIX="${TARGET_PREFIX}" \
55 EXEC_DIR="${D}${installdir}/ti-linuxutils-app/cmem-app" \
56 install
57 # Install EDMA
58 if [ ${SOC_FAMILY} = "dm365" ] ; then
59 cd ${S}/packages/ti/sdo/linuxutils/edma/apps
60 make \
61 LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
62 MVTOOL_PREFIX="${TARGET_PREFIX}" \
63 UCTOOL_PREFIX="${TARGET_PREFIX}" \
64 EXEC_DIR="${D}${installdir}/ti-linuxutils-app/edma-app" \
65 install
66 fi
67
68 # stage tree - other packages may need this
69 install -d ${D}${LINUXUTILS_INSTALL_DIR_RECIPE}
70 cp -pPrf ${S}/* ${D}${LINUXUTILS_INSTALL_DIR_RECIPE}
71}
72
73
74
75
76PACKAGES =+ " ti-cmem-module \
77 ti-sdma-module \
78 ti-edma-module \
79 ti-irq-module \
80 ti-linuxutils-app"
81
82FILES_ti-cmem-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmem*.ko"
83FILES_ti-sdma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdma*.ko"
84FILES_ti-edma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/edma*.ko"
85FILES_ti-irq-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/irq*.ko"
86
87FILES_ti-linuxutils-app = "${installdir}/ti-linuxutils-app/*/*"
88
89INSANE_SKIP_ti-linuxutils-app = "True"
90PACKAGE_STRIP = "no"
diff --git a/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix-2.patch b/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix-2.patch
new file mode 100644
index 00000000..1438003c
--- /dev/null
+++ b/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix-2.patch
@@ -0,0 +1,22 @@
1From: Koen Kooi <k-kooi@ti.com>
2Subject: linuxutils: fix build with 2.6.37rcX
3
4---
5
6--- /tmp/sdmak.c 2010-12-05 18:43:55.000000000 +0100
7+++ linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c 2010-12-05 18:48:31.000000000 +0100
8@@ -208,9 +208,12 @@
9 }
10
11 up_read(&current->mm->mmap_sem);
12-
13+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
14+ sema_init(&(channels[channel].mutex),1);
15+#else
16 init_MUTEX_LOCKED(&(channels[channel].mutex));
17- channels[channel].owner = filp;
18+#endif
19+ channels[channel].owner = filp;
20
21 if (copy_to_user(argp, &channel, sizeof(channel))) {
22 return -EFAULT;
diff --git a/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch b/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch
new file mode 100644
index 00000000..29b0a444
--- /dev/null
+++ b/recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch
@@ -0,0 +1,73 @@
1From: Koen Kooi <k-kooi@ti.com>
2Subject: linuxutils: fix build with 2.6.37rcX
3
4---
5
6--- /tmp/cmemk.c 2010-12-05 18:41:00.000000000 +0100
7+++ linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2010-12-05 18:43:24.000000000 +0100
8@@ -31,6 +31,7 @@
9 #include <linux/seq_file.h>
10 #include <linux/vmalloc.h>
11 #include <linux/sched.h>
12+#include <linux/slab.h>
13 #include <asm/cacheflush.h>
14 #include <asm/uaccess.h>
15 #include <asm/pgtable.h>
16@@ -204,7 +205,11 @@
17 "\n\t\t fall back to a heap-based allocation attempt");
18 module_param(useHeapIfPoolUnavailable, int, S_IRUGO);
19
20+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
21+static DEFINE_SEMAPHORE(cmem_mutex);
22+#else
23 static DECLARE_MUTEX(cmem_mutex);
24+#endif
25
26 /* Describes a pool buffer */
27 typedef struct pool_buffer {
28@@ -243,8 +248,12 @@
29
30 static struct file_operations cmem_fxns = {
31 owner: THIS_MODULE,
32+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
33+ unlocked_ioctl: ioctl,
34+#else
35 ioctl: ioctl,
36- mmap: mmap,
37+#endif
38+ mmap: mmap,
39 open: open,
40 release: release
41 };
42--- /tmp/sdmak.c 2010-12-05 18:43:55.000000000 +0100
43+++ linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c 2010-12-05 18:48:31.000000000 +0100
44@@ -208,9 +208,12 @@
45 }
46
47 up_read(&current->mm->mmap_sem);
48-
49+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
50+ sema_init(&(channels[channel].mutex),1);
51+#else
52 init_MUTEX_LOCKED(&(channels[channel].mutex));
53- channels[channel].owner = filp;
54+#endif
55+ channels[channel].owner = filp;
56
57 if (copy_to_user(argp, &channel, sizeof(channel))) {
58 return -EFAULT;
59@@ -286,8 +289,12 @@
60 }
61
62 static struct file_operations fops = {
63- .ioctl = dma_ioctl,
64- .release = dma_release,
65+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
66+ .unlocked_ioctl = dma_ioctl,
67+#else
68+ .ioctl = dma_ioctl,
69+#endif
70+ .release = dma_release,
71 .owner = THIS_MODULE
72 };
73
diff --git a/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb b/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb
new file mode 100644
index 00000000..2a67e6a4
--- /dev/null
+++ b/recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb
@@ -0,0 +1,10 @@
1require ti-linuxutils.inc
2
3SRC_URI += "file://linuxutils-BKL-fix-2.patch"
4
5PE = "1"
6PV = "2_26_01_02"
7
8SRC_URI[md5sum] = "70b4918bc35c1bcfef34d6ba3fbce0c8"
9SRC_URI[sha256sum] = "51266dd928f8d629cd417c869789a6c0d596612120f165619119cbaadfd66ee2"
10