mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-05-09 13:01:00 +00:00
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>
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
DESCRIPTION = "MFP Linux utils for TI ARM/DSP processors"
|
||||
SECTION = "devel"
|
||||
LICENSE = "GPLv2,BSD"
|
||||
|
||||
BASE_SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/linuxutils/${PV}/exports"
|
||||
SRC_URI = "${BASE_SRC_URI}/linuxutils_${PV}.tar.gz "
|
||||
|
||||
LIC_FILES_CHKSUM = "file://gpl_2.0.txt;md5=1298794fc2eed3df92a89f3c9d317440"
|
||||
|
||||
S = "${WORKDIR}/linuxutils_${PV}"
|
||||
|
||||
require recipes-ti/includes/ti-paths.inc
|
||||
require recipes-ti/includes/ti-staging.inc
|
||||
|
||||
#This is a kernel module, don't set PR directly
|
||||
MACHINE_KERNEL_PR_append = "d"
|
||||
|
||||
inherit module
|
||||
|
||||
do_compile() {
|
||||
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
|
||||
|
||||
case ${SOC_FAMILY} in
|
||||
dm365)
|
||||
modules="cmem edma irq";;
|
||||
omap3)
|
||||
modules="cmem sdma";;
|
||||
dm355)
|
||||
modules="cmem edma irq";;
|
||||
*)
|
||||
modules="cmem"
|
||||
esac
|
||||
|
||||
for module in $modules ; do
|
||||
cd ${S}/packages/ti/sdo/linuxutils/$module
|
||||
make \
|
||||
LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
|
||||
MVTOOL_PREFIX="${TARGET_PREFIX}" \
|
||||
UCTOOL_PREFIX="${TARGET_PREFIX}" \
|
||||
clean debug release
|
||||
done
|
||||
}
|
||||
|
||||
do_install () {
|
||||
install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
|
||||
# Install CMEM
|
||||
for module in $(find ${S}/packages/ti/sdo/linuxutils/ -name "*.ko") ; do
|
||||
install -m 0755 $module ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
|
||||
done
|
||||
cd ${S}/packages/ti/sdo/linuxutils/cmem/apps
|
||||
make \
|
||||
LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
|
||||
MVTOOL_PREFIX="${TARGET_PREFIX}" \
|
||||
UCTOOL_PREFIX="${TARGET_PREFIX}" \
|
||||
EXEC_DIR="${D}${installdir}/ti-linuxutils-app/cmem-app" \
|
||||
install
|
||||
# Install EDMA
|
||||
if [ ${SOC_FAMILY} = "dm365" ] ; then
|
||||
cd ${S}/packages/ti/sdo/linuxutils/edma/apps
|
||||
make \
|
||||
LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
|
||||
MVTOOL_PREFIX="${TARGET_PREFIX}" \
|
||||
UCTOOL_PREFIX="${TARGET_PREFIX}" \
|
||||
EXEC_DIR="${D}${installdir}/ti-linuxutils-app/edma-app" \
|
||||
install
|
||||
fi
|
||||
|
||||
# stage tree - other packages may need this
|
||||
install -d ${D}${LINUXUTILS_INSTALL_DIR_RECIPE}
|
||||
cp -pPrf ${S}/* ${D}${LINUXUTILS_INSTALL_DIR_RECIPE}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
PACKAGES =+ " ti-cmem-module \
|
||||
ti-sdma-module \
|
||||
ti-edma-module \
|
||||
ti-irq-module \
|
||||
ti-linuxutils-app"
|
||||
|
||||
FILES_ti-cmem-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmem*.ko"
|
||||
FILES_ti-sdma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdma*.ko"
|
||||
FILES_ti-edma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/edma*.ko"
|
||||
FILES_ti-irq-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/irq*.ko"
|
||||
|
||||
FILES_ti-linuxutils-app = "${installdir}/ti-linuxutils-app/*/*"
|
||||
|
||||
INSANE_SKIP_ti-linuxutils-app = "True"
|
||||
PACKAGE_STRIP = "no"
|
||||
@@ -0,0 +1,22 @@
|
||||
From: Koen Kooi <k-kooi@ti.com>
|
||||
Subject: linuxutils: fix build with 2.6.37rcX
|
||||
|
||||
---
|
||||
|
||||
--- /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(¤t->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;
|
||||
@@ -0,0 +1,73 @@
|
||||
From: Koen Kooi <k-kooi@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(¤t->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
|
||||
};
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
require ti-linuxutils.inc
|
||||
|
||||
SRC_URI += "file://linuxutils-BKL-fix-2.patch"
|
||||
|
||||
PE = "1"
|
||||
PV = "2_26_01_02"
|
||||
|
||||
SRC_URI[md5sum] = "70b4918bc35c1bcfef34d6ba3fbce0c8"
|
||||
SRC_URI[sha256sum] = "51266dd928f8d629cd417c869789a6c0d596612120f165619119cbaadfd66ee2"
|
||||
|
||||
Reference in New Issue
Block a user