summaryrefslogtreecommitdiff
path: root/packages/dsplink
diff options
context:
space:
mode:
Diffstat (limited to 'packages/dsplink')
-rwxr-xr-xpackages/dsplink/files/Makefile-dsplink-gpp2
-rw-r--r--packages/dsplink/files/sdma-class-device-and-includes-fix.patch59
-rw-r--r--packages/dsplink/ti-codec-engine_2.21.bb48
3 files changed, 101 insertions, 8 deletions
diff --git a/packages/dsplink/files/Makefile-dsplink-gpp b/packages/dsplink/files/Makefile-dsplink-gpp
index e69ce75f19..d9f2f6209a 100755
--- a/packages/dsplink/files/Makefile-dsplink-gpp
+++ b/packages/dsplink/files/Makefile-dsplink-gpp
@@ -29,7 +29,7 @@ SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP)SOURCES
PMGR_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP),$(SOURCES))
SOURCES :=
-include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(DIRSEP)SOURCES
+include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)SOURCES
OSAL_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(DIRSEP),$(SOURCES))
SOURCES :=
include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES
diff --git a/packages/dsplink/files/sdma-class-device-and-includes-fix.patch b/packages/dsplink/files/sdma-class-device-and-includes-fix.patch
new file mode 100644
index 0000000000..2dcc7a3b7e
--- /dev/null
+++ b/packages/dsplink/files/sdma-class-device-and-includes-fix.patch
@@ -0,0 +1,59 @@
+diff -uNr codec_engine_2_21/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c codec_engine_2_21_fix/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c
+--- codec_engine_2_21/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c 2009-02-20 14:49:41.000000000 +0000
++++ codec_engine_2_21_fix/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c 2009-02-20 15:07:59.000000000 +0000
+@@ -17,6 +17,7 @@
+ /*
+ * sdmak.c
+ */
++#include <linux/version.h>
+ #include <linux/kernel.h>
+ #include <linux/sched.h>
+ #include <linux/module.h>
+@@ -32,14 +33,20 @@
+ #include <linux/irq.h>
+ #include <linux/highmem.h>
+ #include <linux/pagemap.h>
+-
+-#include <asm/arch/dma.h>
+ #include <asm/uaccess.h>
+ #include <asm/system.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
++#include <asm/arch/dma.h>
+ #include <asm/hardware.h>
+ #include <asm/dma.h>
+-#include <asm/io.h>
+ #include <asm/arch/tc.h>
++#else
++#include <asm/dma.h>
++#include <mach/hardware.h>
++#include <mach/dma.h>
++#include <mach/tc.h>
++#endif
++#include <asm/io.h>
+
+ #include "../interface/sdma.h"
+
+@@ -229,7 +236,11 @@
+ __D("sdma registered major = %d\n", major);
+
+ dma_class = class_create(THIS_MODULE, "sdma");
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
+ class_device_create(dma_class, NULL, MKDEV(major, 0), NULL, "sdma");
++#else
++ device_create(dma_class, NULL, MKDEV(major, 0), NULL, "sdma");
++#endif
+
+ for (channel = 0; channel < SDMA_NUMCHANNELS; channel++) {
+ channels[channel].owner = NULL;
+@@ -248,7 +259,11 @@
+ omap_free_dma(channel);
+ }
+ }
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
+ class_device_destroy(dma_class, MKDEV(major, 0));
++#else
++ device_destroy(dma_class, MKDEV(major, 0));
++#endif
+ class_destroy(dma_class);
+ unregister_chrdev(major, "sdma");
+
diff --git a/packages/dsplink/ti-codec-engine_2.21.bb b/packages/dsplink/ti-codec-engine_2.21.bb
index b87deadaa9..805715bd74 100644
--- a/packages/dsplink/ti-codec-engine_2.21.bb
+++ b/packages/dsplink/ti-codec-engine_2.21.bb
@@ -8,7 +8,7 @@ RDEPENDS = "update-modules"
inherit module
# tconf from xdctools dislikes '.' in pwd :/
-PR = "r13"
+PR = "r14"
PV = "221"
# Get CE tarball from TI website, place in sources and calculate
@@ -17,6 +17,7 @@ PV = "221"
SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_21.tar.gz \
file://cmem-class-device-27-and-sched-include-fix.patch;patch=1 \
+ file://sdma-class-device-and-includes-fix.patch;patch=1 \
file://dsplink-semaphore-27.patch;patch=1 \
file://lpm-device-create-and-semaphore-include-fix.patch;patch=1 \
file://lpm-make-symbol-warnings-fix.patch;patch=1 \
@@ -69,7 +70,7 @@ do_compile_append() {
echo "LINUXKERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}" >> ${S}/Rules.make
#export DSPLINK=${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/dsplink
- # Build the cmem kernel module
+ # Build the cmem kernel module and associated test apps
# We unset CFLAGS because kernel modules need different ones, this is basically a verbatim copy of kernel.bbclass and module-base.bbclass
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
@@ -82,7 +83,27 @@ do_compile_append() {
AR="${KERNEL_AR}"
fi
-#need to add other modules here, like SDMA, etc
+#sdma bits
+ if [ -e ${S}/cetools/packages/ti/sdo/linuxutils/sdma ] ; then
+ echo "MVTOOL_PREFIX=${TARGET_PREFIX}" > ${S}/Rules.make
+ echo "UCTOOL_PREFIX=${TARGET_PREFIX}" >> ${S}/Rules.make
+ echo "LINUXKERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}" >> ${S}/Rules.make
+
+ # Build the sdma kernel module and associated test apps
+ # We unset CFLAGS because kernel modules need different ones, this is basically a verbatim copy of kernel.bbclass and module-base.bbclass
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+
+ cd ${S}/cetools/packages/ti/sdo/linuxutils/sdma
+ oe_runmake clean
+ 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}"
+ fi
+
+
+#need to add other modules here, like IRQ, etc
#now build the CE examples
@@ -134,8 +155,9 @@ do_compile_append() {
do_install_append () {
#driver - kernel module
install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
- cp ${S}/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true
cp ${S}/cetools/packages/ti/bios/power/modules/${DSPPOWERSOC}/lpm/*.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true
+ cp ${S}/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true
+ cp ${S}/cetools/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true
#library
#install -d ${D}/${libdir}
@@ -193,10 +215,11 @@ do_install_append () {
# - TODO...
}
-PACKAGES =+ "ti-lpm-module ti-cmem-module ti-codec-engine-apps"
+PACKAGES =+ "ti-lpm-module ti-cmem-module ti-sdma-module ti-codec-engine-apps"
FILES_ti-lpm-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko"
FILES_ti-cmem-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmemk.ko"
+FILES_ti-sdma-moduke = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdmak.ko"
FILES_ti-codec-engine-apps = "${datadir}/ti-codec-engine/*"
pkg_postinst_ti-lpm-module () {
@@ -223,6 +246,18 @@ pkg_postrm_ti-cmem-module () {
update-modules || true
}
+pkg_postinst_ti-sdma-module () {
+ if [ -n "$D" ]; then
+ exit 1
+ fi
+ depmod -a
+ update-modules || true
+}
+
+pkg_postrm_ti-sdma-module () {
+ update-modules || true
+}
+
INHIBIT_PACKAGE_STRIP = "1"
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -231,10 +266,9 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
RPROVIDES_ti-cmem-module += "ti-cmemk-module"
RREPLACES_ti-cmem-module += "ti-cmemk-module"
-
# ti-dsplink-module can be built by either codec-engine or standalone dsplink - tell it to use this one, else unwanted dependence
PREFERRED_PROVIDER_ti-dsplink-module = "ti-codec-engine"
#add run-time dependencies - note for kernel module we can only use RRECOMMENDS, since modules might be built into the kernel
-RRECOMMENDS_ti-codec-engine-apps += "ti-dsplink-module ti-lpm-module ti-cmem-module"
+RRECOMMENDS_ti-codec-engine-apps += "ti-dsplink-module ti-lpm-module ti-cmem-module ti-sdma-module"