From e32f2b80be99d999fddfb1673dd014f70805048b Mon Sep 17 00:00:00 2001 From: Enrico Butera Date: Sat, 6 Aug 2011 13:02:30 +0200 Subject: import codec engine and dependencies from oe classic Signed-off-by: Enrico Butera Signed-off-by: Koen Kooi --- recipes-ti/linuxutils/ti-linuxutils.inc | 90 ++++++++++++++++++++++ .../ti-linuxutils/linuxutils-BKL-fix-2.patch | 22 ++++++ .../ti-linuxutils/linuxutils-BKL-fix.patch | 73 ++++++++++++++++++ recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb | 10 +++ 4 files changed, 195 insertions(+) create mode 100644 recipes-ti/linuxutils/ti-linuxutils.inc create mode 100644 recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix-2.patch create mode 100644 recipes-ti/linuxutils/ti-linuxutils/linuxutils-BKL-fix.patch create mode 100644 recipes-ti/linuxutils/ti-linuxutils_2.26.01.02.bb (limited to 'recipes-ti/linuxutils') 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 @@ +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" 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 @@ +From: Koen Kooi +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; 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 @@ +From: Koen Kooi +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 + #include + #include ++#include + #include + #include + #include +@@ -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 + }; + 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 @@ +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" + -- cgit v1.2.3-54-g00ecf