diff options
author | Philip Balister <philip@balister.org> | 2009-02-13 14:12:54 -0500 |
---|---|---|
committer | Philip Balister <philip@balister.org> | 2009-02-13 14:12:54 -0500 |
commit | 18992093169e9ebd2a61989b853986a77199be35 (patch) | |
tree | d08928e78b95ea9dcbd7a4f5a193b18e197e8a8d /packages/dsplink | |
parent | 36001a65d7eb5f4432b999d24c29501834a3b431 (diff) | |
parent | 97b340db7c7b9ee3ed53e02eaa63c9873f4e1610 (diff) |
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'packages/dsplink')
-rw-r--r-- | packages/dsplink/codec-engine_2.21.bb | 21 | ||||
-rw-r--r-- | packages/dsplink/dmai_1.20.bb | 44 | ||||
-rw-r--r-- | packages/dsplink/dsplink.inc | 13 | ||||
-rw-r--r-- | packages/dsplink/dsplink_1.60.bb | 3 | ||||
-rw-r--r-- | packages/dsplink/files/built-with-angstrom.patch | 48 | ||||
-rw-r--r-- | packages/dsplink/files/cmem-class-device-27-and-sched-include-fix.patch | 23 | ||||
-rw-r--r-- | packages/dsplink/files/do-not-panic-on-mixer-failure.patch | 31 | ||||
-rw-r--r-- | packages/dsplink/files/dsplink-semaphore-27.patch | 36 | ||||
-rw-r--r-- | packages/dsplink/files/lpm-device-create-and-semaphore-include-fix.patch | 121 | ||||
-rw-r--r-- | packages/dsplink/files/support-32bit-align.patch | 17 | ||||
-rw-r--r-- | packages/dsplink/files/update-cpu-name.patch | 16 | ||||
-rw-r--r-- | packages/dsplink/files/update-fb-display.patch | 77 | ||||
-rw-r--r-- | packages/dsplink/files/update-v4l2-display.patch | 127 | ||||
-rw-r--r-- | packages/dsplink/readme.txt | 10 | ||||
-rw-r--r-- | packages/dsplink/ti-paths.inc | 9 |
15 files changed, 579 insertions, 17 deletions
diff --git a/packages/dsplink/codec-engine_2.21.bb b/packages/dsplink/codec-engine_2.21.bb index 1b958bd385..5040867178 100644 --- a/packages/dsplink/codec-engine_2.21.bb +++ b/packages/dsplink/codec-engine_2.21.bb @@ -8,7 +8,7 @@ RDEPENDS = "update-modules" inherit module # tconf from xdctools dislikes '.' in pwd :/ -PR = "r7" +PR = "r8" PV = "221" # Get CE tarball from TI website, place in sources and calculate @@ -16,7 +16,9 @@ PV = "221" # Look for tarball at https://www-a.ti.com/downloads/sds_support/targetcontent/CE/index.html SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_21.tar.gz \ - file://cmemk-class-device-27.diff \ + file://cmem-class-device-27-and-sched-include-fix.patch;patch=1 \ + file://dsplink-semaphore-27.patch;patch=1 \ + file://lpm-device-create-and-semaphore-include-fix.patch;patch=1 \ file://Makefile.dsplink \ file://Makefile-dsplink-kbuild \ file://Makefile-dsplink-gpp \ @@ -42,8 +44,19 @@ do_compile_append() { -e s:/db/toolsrc/library/tools/vendors/opensource/gcc/4.1.0/Linux/gcc-4.1.0-glibc-2.3.6/i686-unknown-linux-gnu:/usr:g \ -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g \ -e 's:true, // build for uC Linux:false,:g' \ - -e 's:true, // build for PC Linux:false,:g' \ - ${S}/examples/user.bld + -e 's:true, // build for PC Linux:false,:g' \ + ${S}/examples/user.bld + + # For now, remove all targets, except dm6446 and omap3530 + sed -i \ + -e '/evmDM357/d' \ + -e '/evmDM6467/d' \ + -e '/evmDM355/d' \ + -e '/evmDM6437/d' \ + -e '/evmDM648/d' \ + -e '/sdp3430/d' \ + -e '/evm2530/d' \ + ${S}/examples/user.bld # Fix path to c6x codegen sed -i -e s:/db/toolsrc/library/tools/vendors/ti/c6x/6.0.16/Linux:${TITOOLSDIR}/${TICGTOOLSDIR}:g \ diff --git a/packages/dsplink/dmai_1.20.bb b/packages/dsplink/dmai_1.20.bb new file mode 100644 index 0000000000..f4e6a4e1ba --- /dev/null +++ b/packages/dsplink/dmai_1.20.bb @@ -0,0 +1,44 @@ +DESCRIPTION = "Davinci (and OMAP) Multimedia Application Interface" +DEPENDS = "virtual/kernel codec-engine" +LICENCE = "unknown" + +require ti-paths.inc + +# https://www-a.ti.com/downloads/sds_support/applications_packages/dmai/dmai_1_20_00_06/dmai_setuplinux_1_20_00_06.bin +# Install the above link and put the dmai_1_20_00_06.tar.gz file in the same directory as this recipe +SRC_URI = "file://dmai_1_20_00_06.tar.gz \ + file://update-cpu-name.patch;patch=1 \ + file://update-fb-display.patch;patch=1 \ + file://update-v4l2-display.patch;patch=1 \ + file://do-not-panic-on-mixer-failure.patch;patch=1 \ + file://support-32bit-align.patch;patch=1 \ +# file://resizer-fix.patch;patch=1 \ + file://built-with-angstrom.patch;patch=1 \ + " + +S = "${WORKDIR}/dmai_1_20_00_06" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +TARGET = "all" +TARGET_neuros-osd2 = " dm6446_al dm6446_db" +TARGET_beagleboard = " o3530_al o3530_db" + +export CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine/cetools" + +do_compile() { + cd packages/ti/sdo/dmai + oe_runmake clean + oe_runmake ${TARGET} + cd packages/ti/sdo/dmai/apps + oe_runmake clean + oe_runmake ${TARGET} +} + +do_install () { + oe_runmake install +} + +do_stage () { + : +} diff --git a/packages/dsplink/dsplink.inc b/packages/dsplink/dsplink.inc index b263be331a..002d08d2a7 100644 --- a/packages/dsplink/dsplink.inc +++ b/packages/dsplink/dsplink.inc @@ -21,11 +21,6 @@ do_configure () { cd ${DSPLINK} perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 --dspcfg_0=${DSPCFG} --dspos_0=DSPBIOS5XX --gppos=${GPPOS} --comps=ponslrm ) - - if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 26 ] ; then - sed -i -e s:asm/semaphore:linux/semaphore: ${DSPLINK}/gpp/src/osal/Linux/user.c - sed -i -e s:asm/semaphore:linux/semaphore: ${DSPLINK}/gpp/src/osal/Linux/2.6.18/sync.c - fi } PARALLEL_MAKE = "" @@ -64,7 +59,6 @@ do_compile () { unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS export KDIR=${STAGING_KERNEL_DIR} make -e all - make -e -f ${WORKDIR}/Makefile-dsplink-dsp #lpm bits @@ -97,13 +91,8 @@ do_compile () { # Build the cmem kernel module # 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/cmem - - # This sadly breaks doing -c compile more than once, but I don't have a better solution - if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 26 ] ; then - patch -p0 < ${WORKDIR}/cmemk-class-device-27.diff - fi + cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem oe_runmake clean oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ KERNEL_SRC=${STAGING_KERNEL_DIR} \ diff --git a/packages/dsplink/dsplink_1.60.bb b/packages/dsplink/dsplink_1.60.bb index 7474e8542c..3814f6353e 100644 --- a/packages/dsplink/dsplink_1.60.bb +++ b/packages/dsplink/dsplink_1.60.bb @@ -1,7 +1,7 @@ require dsplink.inc # The tconf tool breaks if there is a '.' in your pwd -PR = "r7" +PR = "r8" PE = "1" PV = "160" @@ -10,6 +10,7 @@ PV = "160" # Look for tarball at https://www-a.ti.com/downloads/sds_support/targetcontent/link/link_1_60/index.html SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_60.tar.gz \ + file://dsplink-semaphore-27.patch;patch=1;pnum=4 \ file://Makefile-dsplink-gpp \ file://Makefile-dsplink-dsp \ " diff --git a/packages/dsplink/files/built-with-angstrom.patch b/packages/dsplink/files/built-with-angstrom.patch new file mode 100644 index 0000000000..fc49789718 --- /dev/null +++ b/packages/dsplink/files/built-with-angstrom.patch @@ -0,0 +1,48 @@ +Index: dmai_1_20_00_06/packages/config.bld +=================================================================== +--- dmai_1_20_00_06.orig/packages/config.bld 2009-02-11 19:38:51.000000000 -0600 ++++ dmai_1_20_00_06/packages/config.bld 2009-02-11 19:39:23.000000000 -0600 +@@ -42,7 +42,7 @@ + + /* location of the Codec Sourcery Arm9 tools */ + var GCArmv5T = xdc.useModule('gnu.targets.arm.GCArmv5T'); +-GCArmv5T.LONGNAME = 'bin/arm-none-linux-gnueabi-gcc'; ++GCArmv5T.LONGNAME = 'bin/arm-angstrom-linux-gnueabi-gcc'; + GCArmv5T.platform = "ti.platforms.evm3530"; + GCArmv5T.rootDir = java.lang.System.getenv("CSTOOL_DIR"); + +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/Makefile +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/Makefile 2009-02-11 19:39:57.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/Makefile 2009-02-11 19:58:05.000000000 -0600 +@@ -33,7 +33,7 @@ + DMAI_INSTALL_DIR = ../../../.. + TARGET = dmai + +-include $(DMAI_INSTALL_DIR)/Rules.make ++#include $(DMAI_INSTALL_DIR)/Rules.make + + # Should the full command be echoed to the console during build? + VERBOSE=false +@@ -64,7 +64,7 @@ + MVL_CPP_FLAGS = $(GNU_CPP_FLAGS) -Dxdc_target_name__=MVArm9 + CS_CPP_FLAGS = $(GNU_CPP_FLAGS) -Dxdc_target_name__=codesourcery/GCArmv5T + +-GNU_C_FLAGS = $(C_FLAGS) -Wall -Werror ++GNU_C_FLAGS = $(C_FLAGS) -Wall + C64P_C_FLAGS = $(C_FLAGS) + + GNU_AR_FLAGS = $(AR_FLAGS) +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/apps/Makefile.app +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/apps/Makefile.app 2009-02-11 19:58:44.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/apps/Makefile.app 2009-02-11 19:59:01.000000000 -0600 +@@ -34,7 +34,7 @@ + ifndef DMAI_INSTALL_DIR + DMAI_INSTALL_DIR = ../../../../../.. + endif +-include $(DMAI_INSTALL_DIR)/Rules.make ++#include $(DMAI_INSTALL_DIR)/Rules.make + + # Should the full command be echoed to the console during build? + VERBOSE=false diff --git a/packages/dsplink/files/cmem-class-device-27-and-sched-include-fix.patch b/packages/dsplink/files/cmem-class-device-27-and-sched-include-fix.patch new file mode 100644 index 0000000000..8eb3210bb1 --- /dev/null +++ b/packages/dsplink/files/cmem-class-device-27-and-sched-include-fix.patch @@ -0,0 +1,23 @@ +diff -uNr codec_engine_2_21/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c codec_engine_2_21_fix/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c +--- codec_engine_2_21/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2009-02-12 22:02:15.000000000 +0000 ++++ codec_engine_2_21_fix/cetools/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c 2009-02-12 22:08:49.000000000 +0000 +@@ -29,6 +29,7 @@ + #include <linux/mm.h> + #include <linux/seq_file.h> + #include <linux/vmalloc.h> ++#include <linux/sched.h> + #include <asm/cacheflush.h> + #include <asm/uaccess.h> + #include <asm/pgtable.h> +@@ -1710,7 +1711,11 @@ + #ifdef USE_CLASS_DEVICE + class_device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem"); + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++ device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem"); ++#else + device_create(cmem_class, NULL, MKDEV(cmem_major, 0), "cmem"); ++#endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) + #endif // USE_CLASS_DEVICE + #endif // USE_CLASS_SIMPLE + #endif // USE_UDEV diff --git a/packages/dsplink/files/do-not-panic-on-mixer-failure.patch b/packages/dsplink/files/do-not-panic-on-mixer-failure.patch new file mode 100644 index 0000000000..20e1aece72 --- /dev/null +++ b/packages/dsplink/files/do-not-panic-on-mixer-failure.patch @@ -0,0 +1,31 @@ +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Sound_alsa.c +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/linux/Sound_alsa.c 2009-02-11 19:19:23.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Sound_alsa.c 2009-02-11 19:19:25.000000000 -0600 +@@ -139,7 +139,7 @@ + + snd_mixer_selem_id_free (sid); + snd_mixer_close (rcMixer); +- ++ + return Dmai_EOK; + } + +@@ -431,14 +431,13 @@ + Sound_alsa_delete(hSound); + return NULL; + } +- ++ + if (setMixerVolume (attrs) <0) { +- Sound_alsa_delete (hSound); +- return NULL; ++ Dmai_dbg2("Failed to set the mixer volume on %s (%s)\n", ++ AUDIO_DEVICE, snd_strerror(status)); + } + } + +- + return hSound; + } + diff --git a/packages/dsplink/files/dsplink-semaphore-27.patch b/packages/dsplink/files/dsplink-semaphore-27.patch new file mode 100644 index 0000000000..b2f71169fd --- /dev/null +++ b/packages/dsplink/files/dsplink-semaphore-27.patch @@ -0,0 +1,36 @@ +diff -uNr codec_engine_2_21/cetools/packages/dsplink/gpp/src/osal/Linux/2.6.18/sync.c codec_engine_2_21_fix/cetools/packages/dsplink/gpp/src/osal/Linux/2.6.18/sync.c +--- codec_engine_2_21/cetools/packages/dsplink/gpp/src/osal/Linux/2.6.18/sync.c 2008-12-19 16:27:19.000000000 +0530 ++++ codec_engine_2_21_mod/cetools/packages/dsplink/gpp/src/osal/Linux/2.6.18/sync.c 2009-02-12 10:08:48.000000000 +0530 +@@ -30,9 +30,14 @@ +
+
+ /* ----------------------------------- OS Specific Headers */
++#include <linux/version.h>
+ #include <linux/autoconf.h>
+ #include <linux/spinlock.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+ #include <asm/semaphore.h>
++#else
++#include <linux/semaphore.h>
++#endif
+ #include <linux/timer.h>
+ #include <linux/sched.h>
+ #include <linux/delay.h>
+diff -uNr codec_engine_2_21/cetools/packages/dsplink/gpp/src/osal/Linux/user.c codec_engine_2_21_fix/cetools/packages/dsplink_mod/gpp/src/osal/Linux/user.c +--- codec_engine_2_21/cetools/packages/dsplink/gpp/src/osal/Linux/user.c 2008-12-19 16:27:19.000000000 +0530 ++++ codec_engine_2_21_fix/cetools/packages/dsplink_mod/gpp/src/osal/Linux/user.c 2009-02-12 10:08:05.000000000 +0530 +@@ -30,9 +30,14 @@ +
+
+ /* ----------------------------------- OS Specific Headers */
++#include <linux/version.h>
+ #include <linux/autoconf.h>
+ #include <linux/spinlock.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+ #include <asm/semaphore.h>
++#else
++#include <linux/semaphore.h>
++#endif
+ #include <linux/timer.h>
+ #include <linux/sched.h>
+ #include <linux/delay.h>
diff --git a/packages/dsplink/files/lpm-device-create-and-semaphore-include-fix.patch b/packages/dsplink/files/lpm-device-create-and-semaphore-include-fix.patch new file mode 100644 index 0000000000..a3bc2b14a6 --- /dev/null +++ b/packages/dsplink/files/lpm-device-create-and-semaphore-include-fix.patch @@ -0,0 +1,121 @@ +diff -uNr codec_engine_2_21/cetools/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c +--- codec_engine_2_21/cetools/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c 2008-11-05 00:18:39.000000000 +0000 ++++ codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/omap3530/lpm/lpm_driver.c 2009-02-13 00:16:50.000000000 +0000 +@@ -225,6 +225,9 @@ + .os_wait = lpm_os_wait, + .os_trace = lpm_os_trace, + }; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++ char lpm_tempDeviceCreateName[50]; ++#endif + + TRACE(KERN_ALERT "lpm.ko: + lpm_init\n"); + +@@ -286,9 +289,16 @@ + MKDEV(lpm->inst[i].major, lpm->inst[i].minor), + NULL, "lpm%d", lpm->inst[i].minor); + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++ sprintf(lpm_tempDeviceCreateName, "lpm%d", lpm->inst[i].minor); ++ device_create(lpm->lpm_class, NULL, ++ MKDEV(lpm->inst[i].major, lpm->inst[i].minor), ++ NULL, lpm_tempDeviceCreateName); ++#else + device_create(lpm->lpm_class, NULL, + MKDEV(lpm->inst[i].major, lpm->inst[i].minor), + "lpm%d", lpm->inst[i].minor); ++#endif /* LINUX_VERSION */ + #endif + } + +diff -uNr codec_engine_2_21/cetools/packages/ti/bios/power/modules/omap2530/lpm/lpm_driver.c codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/omap2530/lpm/lpm_driver.c +--- codec_engine_2_21/cetools/packages/ti/bios/power/modules/omap2530/lpm/lpm_driver.c 2008-11-05 00:18:39.000000000 +0000 ++++ codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/omap2530/lpm/lpm_driver.c 2009-02-13 00:16:50.000000000 +0000 +@@ -225,6 +225,9 @@ + .os_wait = lpm_os_wait, + .os_trace = lpm_os_trace, + }; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++ char lpm_tempDeviceCreateName[50]; ++#endif + + TRACE(KERN_ALERT "lpm.ko: + lpm_init\n"); + +@@ -286,9 +289,16 @@ + MKDEV(lpm->inst[i].major, lpm->inst[i].minor), + NULL, "lpm%d", lpm->inst[i].minor); + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++ sprintf(lpm_tempDeviceCreateName, "lpm%d", lpm->inst[i].minor); ++ device_create(lpm->lpm_class, NULL, ++ MKDEV(lpm->inst[i].major, lpm->inst[i].minor), ++ NULL, lpm_tempDeviceCreateName); ++#else + device_create(lpm->lpm_class, NULL, + MKDEV(lpm->inst[i].major, lpm->inst[i].minor), + "lpm%d", lpm->inst[i].minor); ++#endif /* LINUX_VERSION */ + #endif + } + +diff -uNr codec_engine_2_21/cetools/packages/ti/bios/power/modules/dm357/lpm/lpm_driver.c codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/dm357/lpm/lpm_driver.c +--- codec_engine_2_21/cetools/packages/ti/bios/power/modules/dm357/lpm/lpm_driver.c 2008-11-05 00:18:39.000000000 +0000 ++++ codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/dm357/lpm/lpm_driver.c 2009-02-13 00:16:50.000000000 +0000 +@@ -225,6 +225,9 @@ + .os_wait = lpm_os_wait, + .os_trace = lpm_os_trace, + }; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++ char lpm_tempDeviceCreateName[50]; ++#endif + + TRACE(KERN_ALERT "lpm.ko: + lpm_init\n"); + +@@ -286,9 +289,16 @@ + MKDEV(lpm->inst[i].major, lpm->inst[i].minor), + NULL, "lpm%d", lpm->inst[i].minor); + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++ sprintf(lpm_tempDeviceCreateName, "lpm%d", lpm->inst[i].minor); ++ device_create(lpm->lpm_class, NULL, ++ MKDEV(lpm->inst[i].major, lpm->inst[i].minor), ++ NULL, lpm_tempDeviceCreateName); ++#else + device_create(lpm->lpm_class, NULL, + MKDEV(lpm->inst[i].major, lpm->inst[i].minor), + "lpm%d", lpm->inst[i].minor); ++#endif /* LINUX_VERSION */ + #endif + } + +diff -uNr codec_engine_2_21/cetools/packages/ti/bios/power/modules/dm6446/lpm/lpm_driver.c codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/dm6446/lpm/lpm_driver.c +--- codec_engine_2_21/cetools/packages/ti/bios/power/modules/dm6446/lpm/lpm_driver.c 2008-11-05 00:18:39.000000000 +0000 ++++ codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/dm6446/lpm/lpm_driver.c 2009-02-13 00:16:50.000000000 +0000 +@@ -225,6 +225,9 @@ + .os_wait = lpm_os_wait, + .os_trace = lpm_os_trace, + }; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++ char lpm_tempDeviceCreateName[50]; ++#endif + + TRACE(KERN_ALERT "lpm.ko: + lpm_init\n"); + +@@ -286,9 +289,16 @@ + MKDEV(lpm->inst[i].major, lpm->inst[i].minor), + NULL, "lpm%d", lpm->inst[i].minor); + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) ++ sprintf(lpm_tempDeviceCreateName, "lpm%d", lpm->inst[i].minor); ++ device_create(lpm->lpm_class, NULL, ++ MKDEV(lpm->inst[i].major, lpm->inst[i].minor), ++ NULL, lpm_tempDeviceCreateName); ++#else + device_create(lpm->lpm_class, NULL, + MKDEV(lpm->inst[i].major, lpm->inst[i].minor), + "lpm%d", lpm->inst[i].minor); ++#endif /* LINUX_VERSION */ + #endif + } + + diff --git a/packages/dsplink/files/support-32bit-align.patch b/packages/dsplink/files/support-32bit-align.patch new file mode 100644 index 0000000000..0ee817d9d9 --- /dev/null +++ b/packages/dsplink/files/support-32bit-align.patch @@ -0,0 +1,17 @@ +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/linux/omap3530/Resize.c +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/linux/omap3530/Resize.c 2009-02-11 19:20:45.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/linux/omap3530/Resize.c 2009-02-11 19:21:09.000000000 -0600 +@@ -557,9 +557,9 @@ + srcOffset = srcDim.y * srcDim.lineLength + srcDim.x * 2; + dstOffset = dstDim.y * dstDim.lineLength + dstDim.x * 2; + +- /* Input and output buffers must be 4096 bytes aligned */ +- assert(((Buffer_getPhysicalPtr(hDstBuf) + srcOffset) & 0xFFF) == 0); +- assert(((Buffer_getPhysicalPtr(hSrcBuf) + dstOffset) & 0xFFF) == 0); ++ /* Pointers must be a multiple of 32 bytes */ ++ assert((Buffer_getPhysicalPtr(hDstBuf) & 0x1F) == 0); ++ assert((Buffer_getPhysicalPtr(hSrcBuf) & 0x1F) == 0); + + /* Queue the resizer buffers */ + for (i=0; i < 2; i++) { diff --git a/packages/dsplink/files/update-cpu-name.patch b/packages/dsplink/files/update-cpu-name.patch new file mode 100644 index 0000000000..f9905f59bf --- /dev/null +++ b/packages/dsplink/files/update-cpu-name.patch @@ -0,0 +1,16 @@ +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Cpu.c +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/linux/Cpu.c 2009-02-11 18:08:50.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Cpu.c 2009-02-11 18:11:41.000000000 -0600 +@@ -103,7 +103,10 @@ + else if (strcmp(valBuf, "DM357 EVM") == 0) { + *device = Cpu_Device_DM6446; + } +- else if (strcmp(valBuf, "OMAP3EVM Board") == 0) { ++ else if ((strcmp(valBuf, "OMAP3EVM Board") == 0) ++ (strcmp(valBuf, "OMAP3 EVM") == 0) ++ (strcmp(valBuf, "OMAP3 Beagle Board") == 0) ++ ){ + *device = Cpu_Device_OMAP3530; + } + else { diff --git a/packages/dsplink/files/update-fb-display.patch b/packages/dsplink/files/update-fb-display.patch new file mode 100644 index 0000000000..91c1dd15aa --- /dev/null +++ b/packages/dsplink/files/update-fb-display.patch @@ -0,0 +1,77 @@ +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Display_fbdev.c +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/linux/Display_fbdev.c 2009-02-11 19:59:57.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Display_fbdev.c 2009-02-11 20:02:46.000000000 -0600 +@@ -41,10 +41,7 @@ + #include <sys/ioctl.h> + #include <linux/fb.h> + +-#ifdef Dmai_Device_omap3530 +-/* OMAP specific kernel headers */ +-#include <video/omapfbdev.h> +-#else ++#ifndef Dmai_Device_omap3530 + /* Davinci specific kernel headers */ + #include <video/davincifb_ioctl.h> + #endif +@@ -184,11 +181,13 @@ + } + #endif + ++#if 0 + /* Set up the sysfs variables before opening the display device */ + if (_Display_sysfsSetup(attrs, channel) < 0) { + cleanup(hDisplay); + return NULL; + } ++#endif + + /* Open video display device */ + hDisplay->fd = open(attrs->displayDevice, O_RDWR); +@@ -423,6 +422,7 @@ + ******************************************************************************/ + Int Display_fbdev_get(Display_Handle hDisplay, Buffer_Handle *hBufPtr) + { ++#if defined (FBIO_WAITFORVSYNC) + BufTab_Handle hBufTab = hDisplay->hBufTab; + int dummy; + +@@ -436,7 +436,8 @@ + } + + *hBufPtr = BufTab_getBuf(hBufTab, hDisplay->workingIdx); +- ++ ++#endif + return Dmai_EOK; + } + +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Display.c +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/linux/Display.c 2009-02-11 20:00:10.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Display.c 2009-02-11 20:02:07.000000000 -0600 +@@ -80,18 +80,18 @@ + + const Display_Attrs Display_Attrs_O3530_VID_DEFAULT = { + 3, +- Display_Std_V4L2, +- VideoStd_VGA, +- Display_Output_LCD, +- "/dev/video1", ++ Display_Std_FBDEV, ++ VideoStd_D1_NTSC, ++ Display_Output_DVI, ++ "/dev/fb2", + 0 + }; + + const Display_Attrs Display_Attrs_O3530_OSD_DEFAULT = { + 1, + Display_Std_FBDEV, +- VideoStd_VGA, +- Display_Output_LCD, ++ VideoStd_D1_NTSC, ++ Display_Output_DVI, + "/dev/fb0", + 0 + }; diff --git a/packages/dsplink/files/update-v4l2-display.patch b/packages/dsplink/files/update-v4l2-display.patch new file mode 100644 index 0000000000..8bb77d8473 --- /dev/null +++ b/packages/dsplink/files/update-v4l2-display.patch @@ -0,0 +1,127 @@ +Index: dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Display_v4l2.c +=================================================================== +--- dmai_1_20_00_06.orig/packages/ti/sdo/dmai/linux/Display_v4l2.c 2009-02-11 19:22:51.000000000 -0600 ++++ dmai_1_20_00_06/packages/ti/sdo/dmai/linux/Display_v4l2.c 2009-02-11 19:27:02.000000000 -0600 +@@ -120,7 +120,9 @@ + struct v4l2_format fmt; + enum v4l2_buf_type type; + Display_Handle hDisplay; +- Int channel; ++#if defined(Dmai_Device_omap3530) && defined(V4L2_CID_ROTATION) ++ struct v4l2_control control; ++#endif + + assert(attrs); + +@@ -134,44 +136,6 @@ + + hDisplay->userAlloc = TRUE; + +-#ifdef Dmai_Device_omap3530 +- /* channel = 0 - digital video path +- * channel = 1 - analog video path +- */ +- switch (attrs->videoOutput) { +- case Display_Output_SVIDEO: +- case Display_Output_COMPOSITE: +- channel = 1; +- break; +- case Display_Output_DVI: +- case Display_Output_LCD: +- case Display_Output_SYSTEM: +- channel = 0; +- break; +- default: +- /* do nothing */ +- break; +- } +-#else +- if (strcmp(attrs->displayDevice, "/dev/video2") == 0) { +- channel = 0; +- } +- else if (strcmp(attrs->displayDevice, "/dev/video3") == 0) { +- channel = 1; +- } +- else { +- Dmai_err1("%s not a display device\n", attrs->displayDevice); +- cleanup(hDisplay); +- return NULL; +- } +-#endif +- +- /* Set up the sysfs variables before opening the display device */ +- if (_Display_sysfsSetup(attrs, channel) < 0) { +- cleanup(hDisplay); +- return NULL; +- } +- + /* Open video capture device */ + hDisplay->fd = open(attrs->displayDevice, O_RDWR, 0); + +@@ -182,9 +146,8 @@ + return NULL; + } + +-#ifdef Dmai_Device_omap3530 +-#define VIDIOC_S_OMAP2_ROTATION _IOW ('V', 3, int) +- ++ ++#if defined(Dmai_Device_omap3530) && defined(V4L2_CID_ROTATION) + if (attrs->rotation != 0 && attrs->rotation != 90 && + attrs->rotation != 180 && attrs->rotation != 270) { + +@@ -193,49 +156,16 @@ + return NULL; + } + +- if (ioctl(hDisplay->fd, VIDIOC_S_OMAP2_ROTATION, &attrs->rotation) < 0) { +- Dmai_err2("Failed VIDIOC_S_OMAP2_ROTATION on %s (%s)\n", ++ control.id = V4L2_CID_ROTATION; ++ control.value = attrs->rotation; ++ ++ if (ioctl(hDisplay->fd, VIDIOC_S_CTRL, &control) < 0) { ++ Dmai_err2("Failed VIDIOC_S_CTRL on %s (%s)\n", + attrs->displayDevice, strerror(errno)); + cleanup(hDisplay); + return NULL; + } + +- switch (attrs->videoStd) { +- case VideoStd_D1_NTSC: +- fmt.fmt.pix.width = VideoStd_D1_WIDTH; +- fmt.fmt.pix.height = VideoStd_D1_NTSC_HEIGHT; +- break; +- case VideoStd_D1_PAL: +- fmt.fmt.pix.width = VideoStd_D1_WIDTH; +- fmt.fmt.pix.height = VideoStd_D1_PAL_HEIGHT; +- break; +- case VideoStd_VGA: +- fmt.fmt.pix.width = VideoStd_VGA_WIDTH; +- fmt.fmt.pix.height = VideoStd_VGA_HEIGHT; +- break; +- case VideoStd_480P: +- fmt.fmt.pix.width = VideoStd_480P_WIDTH; +- fmt.fmt.pix.height = VideoStd_480P_HEIGHT; +- break; +- case VideoStd_720P_60: +- fmt.fmt.pix.width = VideoStd_480P_WIDTH; +- fmt.fmt.pix.height = VideoStd_480P_HEIGHT; +- break; +- default: +- Dmai_err1("Unknown video standard %d\n", attrs->videoStd); +- cleanup(hDisplay); +- return NULL; +- } +- +- fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_UYVY; +- fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; +- +- if (ioctl(hDisplay->fd, VIDIOC_S_FMT, &fmt) == -1) { +- Dmai_err2("Failed VIDIOC_S_FMT on %s (%s)\n", attrs->displayDevice, +- strerror(errno)); +- cleanup(hDisplay); +- return NULL; +- } + #endif /* Dmai_Device_omap3530 */ + + /* Determine the video image dimensions */ diff --git a/packages/dsplink/readme.txt b/packages/dsplink/readme.txt new file mode 100644 index 0000000000..f20be41d04 --- /dev/null +++ b/packages/dsplink/readme.txt @@ -0,0 +1,10 @@ +placeholder for readme + +todo with this package +- rename top level dsplink directory +- repartion code into different recipes - create codecengine-examples package +- fix lpm build to pick up Module.symversion +- cleanup device selection script - not good to just /d the targets - need cleaner solution +- staging needs work + +- add ce 2.22 diff --git a/packages/dsplink/ti-paths.inc b/packages/dsplink/ti-paths.inc index 188dd54072..ca9a9e6512 100644 --- a/packages/dsplink/ti-paths.inc +++ b/packages/dsplink/ti-paths.inc @@ -23,6 +23,14 @@ export CGTOOLS_V5T="${CROSS_DIR}" export CC_V5T="bin/${TARGET_PREFIX}gcc" export MVTOOL_PREFIX="${TARGET_PREFIX}" +# This tells codec engine which targets to build +DEVICES ?= "DM6446" +DEVICES_omap5912osk = "fixme-ti-paths.inc" +DEVICES_omap3evm = "OMAP3530" +DEVICES_beagleboard = "OMAP3530" +DEVICES_davinci-sffsdr = "DM6446" +DEVICES_davinci-dvevm = "DM6446" + DSPLINKPLATFORM ?= "DAVINCI" DSPLINKPLATFORM_omap5912osk = "OMAP" DSPLINKPLATFORM_beagleboard = "OMAP3530" @@ -51,6 +59,7 @@ GPPOS ?= "MVL5G" GPPOS_beagleboard = "OMAPLSP" GPPOS_omap3evm = "OMAPLSP" +export DEVICES export DSPLINKPLATFORM export DSPLINKDSP export DSPLINKSOC |