diff options
author | Roger Monk <r-monk@ti.com> | 2009-02-13 10:26:38 +0100 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2009-02-13 10:26:38 +0100 |
commit | 648705b899982771a340c07cd739b9224a31c51a (patch) | |
tree | 1938a96ed5157eee6fe51f8dc62153c9ef7eeeb7 /packages/dsplink | |
parent | a06c1df3c75b9b239ea80c7f066e088b7695d347 (diff) |
dsplink: massive build cleanup and improvements. readme.txt added
Diffstat (limited to 'packages/dsplink')
-rw-r--r-- | packages/dsplink/codec-engine_2.21.bb | 19 | ||||
-rw-r--r-- | packages/dsplink/dsplink.inc | 13 | ||||
-rw-r--r-- | packages/dsplink/files/cmem-class-device-27-and-sched-include-fix.patch | 23 | ||||
-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/readme.txt | 10 | ||||
-rw-r--r-- | packages/dsplink/ti-paths.inc | 9 |
7 files changed, 216 insertions, 15 deletions
diff --git a/packages/dsplink/codec-engine_2.21.bb b/packages/dsplink/codec-engine_2.21.bb index 1b958bd385..4722fec642 100644 --- a/packages/dsplink/codec-engine_2.21.bb +++ b/packages/dsplink/codec-engine_2.21.bb @@ -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/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/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/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/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 |