diff options
author | Cliff Brake <cbrake@bec-systems.com> | 2009-02-20 12:05:35 -0500 |
---|---|---|
committer | Cliff Brake <cbrake@bec-systems.com> | 2009-02-20 12:05:35 -0500 |
commit | ab066eb3b73656186a445667aa4f8c46b48644b3 (patch) | |
tree | d3b964b9c48ef1a6fce2d48534d1a8367df40768 /packages/dsplink | |
parent | d512927cbf42dc9a3302ecac790a18d397ea012f (diff) | |
parent | b8215aff2a8d11d99368d7794785b08a6fc0ed4c (diff) |
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'packages/dsplink')
30 files changed, 796 insertions, 667 deletions
diff --git a/packages/dsplink/codec-engine_2.21.bb b/packages/dsplink/codec-engine_2.21.bb deleted file mode 100644 index 5040867178..0000000000 --- a/packages/dsplink/codec-engine_2.21.bb +++ /dev/null @@ -1,87 +0,0 @@ -require dsplink.inc - -DESCRIPTION = "Codec Engine for TI ARM/DSP processors" - -DEPENDS = "virtual/kernel perl-native" -RDEPENDS = "update-modules" - -inherit module - -# tconf from xdctools dislikes '.' in pwd :/ -PR = "r8" -PV = "221" - -# Get CE tarball from TI website, place in sources and calculate -# md5sum -# 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://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 \ - file://Makefile-dsplink-dsp \ -" - -S = "${WORKDIR}/codec_engine_2_21" - -require ti-paths.inc - -export DSPLINK="${S}/cetools/packages/dsplink" - -PARALLEL_MAKE = "" - -# the include files on top define do_compile for the submodules -do_compile_append() { - cd ${S}/examples - - # Fix paths to arm crosstools, c6x codegen and x86 gcc - # Also disable uclibc and x86 builds - sed -i -e s:/db/toolsrc/library/tools/vendors/cs/arm/arm-2007q3:${CROSS_DIR}:g \ - -e s:/db/toolsrc/library/tools/vendors/ti/c6x/6.0.16/Linux:${TITOOLSDIR}/${TICGTOOLSDIR}:g \ - -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 - - # 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 \ - xdcpaths.mak - - # Start building the CE examples: codecs, extensions, servers (codec bundles) and ARM side apps - # the DSP side uses CC to point to the c6x codegen, but would get the gcc tool - unset CC - # Make clean doesn't do what you'd expect, it only cleans stuff you've enabled, so some cruft remains - for i in codecs extensions servers apps ; do - make -e -C ${S}/examples/ti/sdo/ce/examples/$i clean - make -e -C ${S}/examples/ti/sdo/ce/examples/$i - done - -} - - -do_stage_append() { - install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine - cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine/ - ln -sf ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine/packages/ti/sdo/ce ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine/cetools/packages/ti/sdo/ -} - -INHIBIT_PACKAGE_STRIP = "1" - -FILES_${PN} = "${base_sbindir}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/packages/dsplink/dmai_1.16.bb b/packages/dsplink/dmai_1.16.bb deleted file mode 100644 index 456800c37c..0000000000 --- a/packages/dsplink/dmai_1.16.bb +++ /dev/null @@ -1,37 +0,0 @@ -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_16_00_03/dmai_setuplinux_1_16_00_03.bin -# Install the above link and put the dmai_1_16_00_03.tar.gz file in the same directory as this recipe -SRC_URI = "file://dmai_1_16_00_03.tar.gz \ - " - -S = "${WORKDIR}/dmai_1_16_00_03" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -TARGET = "all" -TARGET_neuros-osd2 = " dm6446_al dm6446_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/dmai_1.20.bb b/packages/dsplink/dmai_1.20.bb deleted file mode 100644 index 12cbea4a12..0000000000 --- a/packages/dsplink/dmai_1.20.bb +++ /dev/null @@ -1,44 +0,0 @@ -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" -# Yes, the xdc stuff still breaks with a '.' in PWD -PV = "120" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -TARGET = "all" -TARGET_neuros-osd2 = " dm6446_al dm6446_db" -TARGET_beagleboard = " o3530_al" - -do_compile() { - cd packages/ti/sdo/dmai - oe_runmake clean - oe_runmake ${TARGET} C_FLAGS="-O2 -I${STAGING_INCDIR}" - cd 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 002d08d2a7..1ca01c399c 100644 --- a/packages/dsplink/dsplink.inc +++ b/packages/dsplink/dsplink.inc @@ -4,13 +4,6 @@ DEPENDS = "virtual/kernel perl-native" inherit module -S = "${WORKDIR}/dsplink_1_60/dsplink" - -# Needed for buildscripts -export DSPLINK="${S}" - -require ti-paths.inc - do_configure () { # Clean up stale binaries find ${S} -name "*.ko" -exec rm {} \; || true @@ -23,8 +16,6 @@ do_configure () { ) } -PARALLEL_MAKE = "" - do_compile () { unset DISPLAY sed -i -e s:armv7a:armv7-a:g ${DSPLINK}/make/Linux/omap3530_2.6.mk @@ -48,105 +39,53 @@ do_compile () { export ARCHIVER_AR=${TARGET_PREFIX}ar export BASE_SABIOS=${DSP_BASE_BIOS} + #dsplinkk.ko bits if [ ! -d ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE ] ; then install -d ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE fi -#dsplinkk.ko bits cp ${WORKDIR}/Makefile-dsplink-gpp ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/Makefile cd ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS export KDIR=${STAGING_KERNEL_DIR} - make -e all - make -e -f ${WORKDIR}/Makefile-dsplink-dsp -#lpm bits - if [ -e ${S}/cetools/packages/ti/bios/power/ ] ; 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 - #export DSPLINK=${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/dsplink - - # Build the DSP power manager kernel module - cd ${S}/cetools/packages/ti/bios/power/modules/${DSPPOWERSOC}/lpm - - if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 26 ] ; then - sed -i -e s:asm/semaphore:linux/semaphore: lpm_driver.c - fi - - rm -f *o - make KERNEL_PATH=${STAGING_KERNEL_DIR} \ - KERNEL_SRC=${STAGING_KERNEL_DIR} \ - KERNEL_DIR=${STAGING_KERNEL_DIR} \ - KERNEL_VERSION=${KERNEL_VERSION} \ - TOOL_PREFIX=${TARGET_PREFIX} \ - DSPLINK_REPO=${DSPLINK}/../ \ - CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ - AR="${KERNEL_AR}" - fi + make -e driver + make -e library + make -e samples -#cmemk bits - if [ -e ${S}/cetools/packages/ti/sdo/linuxutils/cmem ] ; then - # 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 - 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 + make -e -f ${WORKDIR}/Makefile-dsplink-dsp + cp -a * ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE } do_install () { - install -d ${D}/${bindir} - install ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/*gpp ${D}/${bindir} || true - - install -d ${D}/${datadir}/dsplink - for i in $(find ${DSPLINK}/dsp/BUILD/ -name "*.out") ; do - install ${i} ${D}/${datadir}/dsplink - done + #driver - kernel module + install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp + cp ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/ + #library install -d ${D}/${libdir} install -m 0755 ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/dsplink.lib ${D}/${libdir} - install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp - cp ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/dsplinkk.ko ${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/${DSPPOWERSOC}/lpm/*.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 + #sample apps + install -d ${D}/${datadir}/ti-dsplink + install ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/*gpp ${D}/${datadir}/ti-dsplink || true + for i in $(find ${DSPLINK}/dsp/BUILD/ -name "*.out") ; do + install ${i} ${D}/${datadir}/ti-dsplink + done } - # Codec Engine and friends need a complete tree, so stage it all do_stage() { - install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/dsplink - cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/dsplink/ -} - -pkg_postinst_dsplink-module () { - if [ -n "$D" ]; then - exit 1 - fi - depmod -a - update-modules || true -} - -pkg_postrm_dsplink-module () { - update-modules || true + install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN} + cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/ } -PACKAGES =+ "dsplink-apps dsplink-module ti-lpm-module ti-cmemk-module" -FILES_dsplink-module = "${sysconfdir} /lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/dsplinkk.ko" -FILES_dsplink-apps = "${bindir}/* ${datadir}/dsplink/* ${libdir}/dsplink.lib" +PACKAGES =+ "ti-dsplink-module ti-dsplink-apps" +FILES_ti-dsplink-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/dsplinkk.ko" +FILES_ti-dsplink-apps = "${datadir}/ti-dsplink/* ${libdir}/dsplink.lib" -FILES_ti-lpm-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko" - -pkg_postinst_ti-lpm-module () { +pkg_postinst_ti-dsplink-module () { if [ -n "$D" ]; then exit 1 fi @@ -154,27 +93,20 @@ pkg_postinst_ti-lpm-module () { update-modules || true } -pkg_postrm_ti-lpm-module () { +pkg_postrm_ti-dsplink-module () { update-modules || true } -FILES_ti-cmemk-module = "${sysconfdir} /lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmemk.ko" - -pkg_postinst_ti-cmemk-module () { - if [ -n "$D" ]; then - exit 1 - fi - depmod -a - update-modules || true -} - -pkg_postrm_ti-cmemk-module () { - update-modules || true -} - +INHIBIT_PACKAGE_STRIP = "1" +PACKAGE_ARCH = "${MACHINE_ARCH}" -INHIBIT_PACKAGE_STRIP = "1" +#legacy upgrade helpers +RPROVIDES_ti-dsplink-module += "dsplink-module" +RREPLACES_ti-dsplink-module += "dsplink-module" +RPROVIDES_ti-dsplink-apps += "dsplink-apps" +RREPLACES_ti_dsplink-apps += "dsplink-apps" -PACKAGE_ARCH = "${MACHINE_ARCH}" +#add run-time dependencies - note for kernel module we can only use RRECOMMENDS, since modules might be built into the kernel +RRECOMMENDS_ti-dsplink-apps += "ti-dsplink-module" diff --git a/packages/dsplink/dsplink_1.60.bb b/packages/dsplink/dsplink_1.60.bb deleted file mode 100644 index 3814f6353e..0000000000 --- a/packages/dsplink/dsplink_1.60.bb +++ /dev/null @@ -1,19 +0,0 @@ -require dsplink.inc - -# The tconf tool breaks if there is a '.' in your pwd -PR = "r8" -PE = "1" -PV = "160" - -# Get dsplink tarball from TI website, place in sources and calculate -# md5sum -# 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 \ -" - -S = "${WORKDIR}/dsplink_1_60/dsplink" - 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/Makefile-dsplink-kbuild b/packages/dsplink/files/Makefile-dsplink-kbuild deleted file mode 100644 index 0fdf896c86..0000000000 --- a/packages/dsplink/files/Makefile-dsplink-kbuild +++ /dev/null @@ -1,74 +0,0 @@ -# Composite Makefile -DIRSEP=/ - -TI_DSPLINK_RELATIVE_PATH := ../ - -# include the CURRENTCFG.mk -include $(DSPLINK)$(DIRSEP)config$(DIRSEP)BUILD$(DIRSEP)CURRENTCFG.MK - -# Generate the list of sources -SOURCES := -include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)arch$(DIRSEP)SOURCES -ARCH_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)arch$(DIRSEP),$(SOURCES)) -SOURCES := -include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)SOURCES -LDRV_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP),$(SOURCES)) -SOURCES := -include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES -LDRV_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)ldrv$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES)) -SOURCES := -include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)gen$(DIRSEP)SOURCES -GEN_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)gen$(DIRSEP),$(SOURCES)) -SOURCES := -include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)SOURCES -PMGR_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP),$(SOURCES)) -SOURCES := -include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES -PMGR_SOURCES += $(addpreifx $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)pmgr$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES)) -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 -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 -OSAL_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES)) -SOURCES := -include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP)SOURCES -OSAL_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)osal$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)$(TI_DSPLINK_GPPOSVERSION)$(DIRSEP),$(SOURCES)) - -DSPLINK_SOURCES := $(ARCH_SOURCES) $(LDRV_SOURCES) $(GEN_SOURCES) $(OSAL_SOURCES) $(PMGR_SOURCES) -DSPLINK_OBJS := $(foreach srcFile, $(DSPLINK_SOURCES),$(basename $(srcFile)).o) - -################################################################################################ -# USER SIDE -# Generate the list of sources -SOURCES := -include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)api$(DIRSEP)SOURCES -API_SOURCES := $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)api$(DIRSEP),$(SOURCES)) -SOURCES := -include $(TI_DSPLINK_GPPROOT)$(DIRSEP)src$(DIRSEP)api$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP)SOURCES -API_SOURCES += $(addprefix $(TI_DSPLINK_RELATIVE_PATH)gpp$(DIRSEP)src$(DIRSEP)api$(DIRSEP)$(TI_DSPLINK_GPPOS)$(DIRSEP),$(SOURCES)) - -# CFLAGS -EXTRA_CFLAGS = $(addprefix -D, $(TI_DSPLINK_GPP_DEFINES)) -EXTRA_CFLAGS += $(addprefix -I, $(TI_DSPLINK_GPP_INC_PATH)) -EXTRA_CFLAGS += -DEXPORT_SYMTAB -EXTRA_CFLAGS += -DTRACE_KERNEL - -ifneq ($(KERNELRELEASE),) -obj-m := dsplinkk.o -libs-m := $(shell pwd) -lib-m := $(foreach srcFile, $(API_SOURCES),$(basename $(srcFile)).o) -dsplinkk-objs := $(DSPLINK_OBJS) -else -KDIR := /opt/montavista/pro/devkit/lsp/ti-davinci/linux-2.6.18_pro500 -PWD := $(shell pwd) -all: - $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules -endif - -clean: - find $(DSPLINK) -name "*.o" -exec rm {} \; - rm -fr dsplinkk.ko dsplinkk.mod.c Module.symvers diff --git a/packages/dsplink/files/Makefile.dsplink b/packages/dsplink/files/Makefile.dsplink deleted file mode 100755 index f3228dd9e7..0000000000 --- a/packages/dsplink/files/Makefile.dsplink +++ /dev/null @@ -1,59 +0,0 @@ -# -# ======== makeunix ======== -# - -# Import Tools Path from Rules.make -#include Rules.make - -PROJECT_BASE_DIR = $(shell pwd) -LINUXKERNEL_INSTALL_DIR:=some-path/kernel -LINK_INSTALL_DIR := some-path/dsplink_1_51/dsplink - -# The prefix to be added before the GNU compiler tools (optionally including -# path), i.e. "arm_v5t_le-" or "/opt/bin/arm_v5t_le-". -GPPTOOL_DIR:=some-path/cross - -# ---- DSP tools ---- -DSP_BASE_CGTOOLS := some-path/cg6x_6_0_19 -DSP_BASE_BIOS := some-path/bios_5_32_03 -DSP_BASE_RTDX := some-path/bios_5_32_03/packages/ti/rtdx -OSINC_PLATFORM1 := something -ARCHIVER_AR := something - - -# ---- construct Link build make vars ---- -GPP_MAKE_OPTS := COMPILER=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-gcc \ - LINKER=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-gcc \ - LD=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-ld \ - ARCHIVER1=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-ld \ - ARCHIVER2=$(GPPTOOL_DIR)/bin/arm-angstrom-linux-gnueabi-ld \ - CROSS_COMPILE=arm-angstrom-linux-gnueabi- \ - DSPLINK=$(LINK_INSTALL_DIR) \ - BASE_TOOLCHAIN=$(GPPTOOL_DIR) \ - BASE_BUILDOS=$(LINUXKERNEL_INSTALL_DIR) \ - ARCHIVER=$(ARCHIVER_AR) OSINC_PLATFORM=$(OSINC_PLATFORM1) \ - -DSP_MAKE_OPTS := DSPLINK=$(DSPLINK) \ - DPPROOT=$(DSPLINK)/dsp \ - BASE_SABIOS=$(DSP_BASE_BIOS) \ - BASE_CGTOOLS=$(DSP_BASE_CGTOOLS) \ - BASE_RTDX=$(DSP_BASE_RTDX) - - -# ======== all ======== -all: $(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/Davinci/RELEASE/dsplinkk.ko - -$(LINK_INSTALL_DIR)/packages/dsplink/gpp/export/BIN/Linux/Davinci/RELEASE/dsplinkk.ko: - @echo Building DSPLINK GPP driver, libs - #make -s -C $(LINK_INSTALL_DIR)/gpp/src $(GPP_MAKE_OPTS) - make -s -C $(DSPLINK)/gpp/src/samples $(GPP_MAKE_OPTS) - @echo Building DSPLINK DSP libs and message sample for DaVinci... - make -C $(DSPLINK)/dsp/src $(DSP_MAKE_OPTS) - make -C $(DSPLINK)/dsp/src/samples $(DSP_MAKE_OPTS) - -# clean rules -clean: - @echo Cleaning DSPLINK GPP driver, libs - make -s -C $(LINK_INSTALL_DIR)/gpp/src $(GPP_MAKE_OPTS) clean - @rm -rf $(LINK_INSTALL_DIR)/gpp/export/BIN/* - @rm -rf $(LINK_INSTALL_DIR)/gpp/export/INCLUDE/* diff --git a/packages/dsplink/files/cmemk-class-device-27.diff b/packages/dsplink/files/cmemk-class-device-27.diff deleted file mode 100644 index 1c51323457..0000000000 --- a/packages/dsplink/files/cmemk-class-device-27.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- /tmp/cmemk.c 2008-12-11 12:21:22.000000000 +0100 -+++ src/module/cmemk.c 2008-12-11 12:22:39.000000000 +0100 -@@ -1710,7 +1710,7 @@ - #ifdef USE_CLASS_DEVICE - class_device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem"); - #else -- device_create(cmem_class, NULL, MKDEV(cmem_major, 0), "cmem"); -+ device_create(cmem_class, NULL, MKDEV(cmem_major, 0), NULL, "cmem"); - #endif // USE_CLASS_DEVICE - #endif // USE_CLASS_SIMPLE - #endif // USE_UDEV diff --git a/packages/dsplink/files/built-with-angstrom.patch b/packages/dsplink/files/dmai-built-with-angstrom.patch index fc49789718..fc49789718 100644 --- a/packages/dsplink/files/built-with-angstrom.patch +++ b/packages/dsplink/files/dmai-built-with-angstrom.patch diff --git a/packages/dsplink/files/do-not-panic-on-mixer-failure.patch b/packages/dsplink/files/dmai-do-not-panic-on-mixer-failure.patch index 20e1aece72..20e1aece72 100644 --- a/packages/dsplink/files/do-not-panic-on-mixer-failure.patch +++ b/packages/dsplink/files/dmai-do-not-panic-on-mixer-failure.patch diff --git a/packages/dsplink/files/support-32bit-align.patch b/packages/dsplink/files/dmai-support-32bit-align.patch index 0ee817d9d9..0ee817d9d9 100644 --- a/packages/dsplink/files/support-32bit-align.patch +++ b/packages/dsplink/files/dmai-support-32bit-align.patch diff --git a/packages/dsplink/files/update-cpu-name.patch b/packages/dsplink/files/dmai-update-cpu-name.patch index 052a8e3236..052a8e3236 100644 --- a/packages/dsplink/files/update-cpu-name.patch +++ b/packages/dsplink/files/dmai-update-cpu-name.patch diff --git a/packages/dsplink/files/update-fb-display.patch b/packages/dsplink/files/dmai-update-fb-display.patch index 91c1dd15aa..91c1dd15aa 100644 --- a/packages/dsplink/files/update-fb-display.patch +++ b/packages/dsplink/files/dmai-update-fb-display.patch diff --git a/packages/dsplink/files/update-v4l2-display.patch b/packages/dsplink/files/dmai-update-v4l2-display.patch index 8bb77d8473..8bb77d8473 100644 --- a/packages/dsplink/files/update-v4l2-display.patch +++ b/packages/dsplink/files/dmai-update-v4l2-display.patch diff --git a/packages/dsplink/files/loadmodules-ti-codec-engine-apps.sh b/packages/dsplink/files/loadmodules-ti-codec-engine-apps.sh new file mode 100755 index 0000000000..743a07ebba --- /dev/null +++ b/packages/dsplink/files/loadmodules-ti-codec-engine-apps.sh @@ -0,0 +1,37 @@ +# +# Default Memory Map - for OMAP3530 CE 2.21 examples +# +# Start Addr Size Description +# ------------------------------------------- +# 0x80000000 80 MB Linux +# 0x85000000 08 MB CMEM +# 0x86000000 24 MB DDRALGHEAP +# 0x87800000 6 MB DDR2 (BIOS, Codecs, Applications) +# 0x87E00000 1 MB DSPLINK (MEM) +# 0x87F00000 4 KB DSPLINK (RESET) +# 0x87F01000 1020 KB unused + +# sanity check to verify that we're using the right mem=xxM (80M in this case) +awk '/MemTotal:/ { + mem=$2 + + if (mem > 80 * 1024) + print "Warning! You need to use mem=80M or less on the kernel cmdline" + + printf "You have %dkB total memory for Linux\n", mem +}' /proc/meminfo + +# Select cmemk parameters for best fit, i.e. starting at 0x85000000 +modprobe cmemk phys_start=0x85000000 phys_end=0x86000000 pools=20x4096,8x131072,5x1048576,1x1429440,1x256000,1x3600000,5x829440 + +# insert DSP/BIOS Link driver +# +modprobe dsplinkk + +# make /dev/dsplink +rm -f /dev/dsplink +mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 + +# insert Local Power Manager driver +# +modprobe lpm_omap3530 diff --git a/packages/dsplink/files/loadmodules-ti-dmai-apps.sh b/packages/dsplink/files/loadmodules-ti-dmai-apps.sh new file mode 100755 index 0000000000..af4cef9f3f --- /dev/null +++ b/packages/dsplink/files/loadmodules-ti-dmai-apps.sh @@ -0,0 +1,37 @@ +# +# Default Memory Map - for OMAP3530 dvsdk examples from 3.00.00.29 - this memory map is used for DMAI apps +# +# Start Addr Size Description +# ------------------------------------------- +# 0x80000000 88 MB Linux +# 0x85800000 08 MB CMEM +# 0x86800000 16 MB DDRALGHEAP +# 0x87800000 6 MB DDR2 (BIOS, Codecs, Applications) +# 0x87E00000 1 MB DSPLINK (MEM) +# 0x87F00000 4 KB DSPLINK (RESET) +# 0x87F01000 1020 KB unused + +# sanity check to verify that we're using the right mem=xxM (88M in this case) +awk '/MemTotal:/ { + mem=$2 + + if (mem > 88 * 1024) + print "Warning! You need to use mem=88M or less on the kernel cmdline" + + printf "You have %dkB total memory for Linux\n", mem +}' /proc/meminfo + +# Select cmemk parameters for best fit, i.e. starting at 0x85000000 +modprobe cmemk phys_start=0x85800000 phys_end=0x86800000 pools=20x4096,8x131072,5x1048576,1x1429440,1x256000,1x3600000,5x829440 + +# insert DSP/BIOS Link driver +# +modprobe dsplinkk + +# make /dev/dsplink +rm -f /dev/dsplink +mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 + +# insert Local Power Manager driver +# +modprobe lpm_omap3530 diff --git a/packages/dsplink/files/loadmodules-ti-dsplink-apps.sh b/packages/dsplink/files/loadmodules-ti-dsplink-apps.sh new file mode 100755 index 0000000000..c93b637867 --- /dev/null +++ b/packages/dsplink/files/loadmodules-ti-dsplink-apps.sh @@ -0,0 +1,25 @@ +# +# Default Memory Map - for OMAP3530 dsplink examples +# +# Start Addr Size Description +# ------------------------------------------- +# 0x80000000 126 MB Linux +# 0x87E00000 2 MB DSPLINK (MEM) + DDR + DSPLINK (RESET) + +# sanity check to verify that we're using the right mem=xxM (126M in this case) +awk '/MemTotal:/ { + mem=$2 + + if (mem > 126 * 1024) + print "Warning! You need to use mem=126M or less on the kernel cmdline" + + printf "You have %dkB total memory for Linux\n", mem +}' /proc/meminfo + +# insert DSP/BIOS Link driver +# +modprobe dsplinkk + +# make /dev/dsplink +rm -f /dev/dsplink +mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" /proc/devices` 0 diff --git a/packages/dsplink/files/lpm-make-symbol-warnings-fix.patch b/packages/dsplink/files/lpm-make-symbol-warnings-fix.patch new file mode 100644 index 0000000000..031a16022f --- /dev/null +++ b/packages/dsplink/files/lpm-make-symbol-warnings-fix.patch @@ -0,0 +1,117 @@ +diff -uNr codec_engine_2_21/cetools/packages/ti/bios/power/modules/omap3530/lpm/Makefile codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/omap3530/lpm/Makefile +--- codec_engine_2_21/cetools/packages/ti/bios/power/modules/omap3530/lpm/Makefile 2008-11-05 00:38:57.000000000 +0000 ++++ codec_engine_2_21_fix/cetools/packages/ti/bios/power/modules/omap3530/lpm/Makefile 2009-02-17 23:53:08.000000000 +0000 +@@ -1,5 +1,5 @@ +-# +-# Copyright 2008 by Texas Instruments Incorporated. ++# --COPYRIGHT--,GPL ++# Copyright $(CPYYEAR) by Texas Instruments Incorporated. + # + # This program is free software: you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -12,31 +12,34 @@ + # + # You should have received a copy of the GNU General Public License + # along with this program. If not, see <http://www.gnu.org/licenses/> +-# ++# --/COPYRIGHT-- + # + + # + # This makefile will build the lpm_omap3530.ko driver. + # + ++# If KERNELRELEASE is undefined, then this makefile has been invoked ++# directly from the command line. Invoke the kernel build system. ++ifeq ($(KERNELRELEASE),) ++ ++ + # Update these macros to reflect you environment. + # +-# KERNEL_DIR = the Linux kernel source directory +-# TOOL_PREFIX = the toolchain directory and decorated name prefix ++# LINUXKERNEL_INSTALL_DIR = the Linux kernel source directory ++# MVTOOL_PREFIX = the toolchain directory and decorated name prefix + # DSPLINK_REPO = the repository which contains DSP/BIOS LINK +-# DSPLINK_BLD = the DSP/BIOS LINK build variant + # +-KERNEL_DIR = /db/toolsrc/library/toolsC38/vendors/mvl/arm/omap3/OMAP35x_SDK_0.9.7/src/linux/kernel_org/2.6_kernel +-TOOL_PREFIX = /db/toolsrc/library/toolsC38/vendors/cs/arm/arm-2007q3/bin/arm-none-linux-gnueabi- +-DSPLINK_REPO = /db/atree/library/trees/power/power-d04x/imports +-DSPLINK_BLD = Linux/OMAP3530/RELEASE ++LINUXKERNEL_INSTALL_DIR := _your_kernel_installation_ ++MVTOOL_PREFIX := _your_codegen_installation_and_name_prefix_ ++DSPLINK_REPO := _your_dsplink_repository_ + + # Set PROFILE to DEBUG or RELEASE + PROFILE = RELEASE + + # Process DSPLINK flags + LINK_DIR = $(DSPLINK_REPO)/dsplink +-LINK_PATH = $(LINK_DIR)/gpp/export/BIN/$(DSPLINK_BLD) ++LINK_PATH = $(LINK_DIR)/gpp/export/BIN/Linux/OMAP3530/RELEASE + LINK_ORIG := $(shell cat $(LINK_PATH)/DSPLINK.txt) + LINK_DEFS := $(shell cat $(LINK_PATH)/PMGR_defines.txt) + LINK_INCS := $(shell cat $(LINK_PATH)/PMGR_includes.txt) +@@ -53,20 +56,11 @@ + # add internal header files + LINK_INCS_INTERNAL = -I$(LINK_DIR)/gpp/export/INCLUDE/Linux/OMAP3530/internal + ++ifneq ($(wildcard $(LINK_PATH)/Module.symvers),) ++EXTRA_SYMBOLS = $(LINK_PATH)/Module.symvers ++endif + +-# If KERNELRELEASE is defined, then this makefile has been invoked +-# from the kernel build system. Use native build language. +-ifneq ($(KERNELRELEASE),) +- +-obj-m := lpm_omap3530.o +-lpm_omap3530-objs := lpm_driver.o lpm_omap.o tal_dsplink_gpp.o +- +- +-# Otherwise, this makefile has been invoked directly from the +-# command line. Invoke the kernel build system. +-else +- +-MAKE_OPTS = ARCH=arm CROSS_COMPILE=$(TOOL_PREFIX) ++MAKE_OPTS = ARCH=arm CROSS_COMPILE=$(MVTOOL_PREFIX) + CFLAGS = -DUSE_UDEV -DOS_LINUX -DLINUX_KERNEL -D$(PROFILE) \ + $(LINK_DEFS) $(LINK_INCS) $(LINK_INCS_INTERNAL) + +@@ -74,19 +68,28 @@ + CFLAGS := -g $(CFLAGS) + endif + +- ++# Invoke the kernel build system + default: +- $(MAKE) -C $(KERNEL_DIR) M=$(CURDIR) $(MAKE_OPTS) \ ++ifneq ($(EXTRA_SYMBOLS),) ++ rm -f Module.symvers ++ cat $(foreach file, $(EXTRA_SYMBOLS), $(file)) >> Module.symvers ++endif ++ $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) M=$(CURDIR) $(MAKE_OPTS) \ + EXTRA_CFLAGS="$(CFLAGS)" modules + + .clean: +- $(MAKE) -C $(KERNEL_DIR) M=$(CURDIR) $(MAKE_OPTS) clean ++ $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) M=$(CURDIR) $(MAKE_OPTS) clean ++ rm -f modules.order + + .help: +- $(MAKE) -C $(KERNEL_DIR) M=$(CURDIR) help ++ $(MAKE) -C $(LINUXKERNEL_INSTALL_DIR) M=$(CURDIR) help + +-endif +-# +-# @(#) ti.bios.power; 1, 1, 0,1; 11-5-2008 16:38:57; /db/atree/library/trees/power/power-d04x/src/ +-# + ++# If KERNELRELEASE is defined, then this makefile has been invoked ++# from the kernel build system. Use native build language. ++else ++ ++obj-m := lpm_omap3530.o ++lpm_omap3530-objs := lpm_driver.o lpm_omap.o tal_dsplink_gpp.o ++ ++endif 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/files/unloadmodules-ti-codec-engine-apps.sh b/packages/dsplink/files/unloadmodules-ti-codec-engine-apps.sh new file mode 100755 index 0000000000..17436a5937 --- /dev/null +++ b/packages/dsplink/files/unloadmodules-ti-codec-engine-apps.sh @@ -0,0 +1,12 @@ +# Unload modules - CODEC ENGINE - OMAP3530 + +# remove lpm module +rmmod lpm_omap3530 + +# remove DSP/BIOS Link driver +rmmod dsplinkk +rm -f /dev/dsplink + +# remove cmem module +rmmod cmemk + diff --git a/packages/dsplink/files/unloadmodules-ti-dmai-apps.sh b/packages/dsplink/files/unloadmodules-ti-dmai-apps.sh new file mode 100755 index 0000000000..2465c43fe9 --- /dev/null +++ b/packages/dsplink/files/unloadmodules-ti-dmai-apps.sh @@ -0,0 +1,12 @@ +# Unload modules - DMAI - OMAP3530 + +# remove lpm module +rmmod lpm_omap3530 + +# remove DSP/BIOS Link driver +rmmod dsplinkk +rm -f /dev/dsplink + +# remove cmem module +rmmod cmemk + diff --git a/packages/dsplink/files/unloadmodules-ti-dsplink-apps.sh b/packages/dsplink/files/unloadmodules-ti-dsplink-apps.sh new file mode 100755 index 0000000000..8694114a70 --- /dev/null +++ b/packages/dsplink/files/unloadmodules-ti-dsplink-apps.sh @@ -0,0 +1,5 @@ +# Unload modules - DSPLINK - OMAP3530 + +# remove DSP/BIOS Link driver +rmmod dsplinkk +rm -f /dev/dsplink diff --git a/packages/dsplink/files/xdcpaths.mak b/packages/dsplink/files/xdcpaths.mak deleted file mode 100644 index 3df3bf6305..0000000000 --- a/packages/dsplink/files/xdcpaths.mak +++ /dev/null @@ -1,232 +0,0 @@ -# -# ======== xdcpaths.mak ======== -# definition of XDC paths and commands -# -# This makefile constructs the "search path" for the XDC tools where it finds -# numerous components and packages needed to build Codec Engine examples and -# programs. -# -# USER NOTE: -# 1) you must specify various <component>_INSTALL_DIRs directores below to -# reflect your installation, where <component> is CE for Codec Engine, -# BIOS for DSP/BIOS, etc. -# 2) you must specify compiler path and name in CGTOOLS_* variables below -# 3) you can remove some of the devices from the "DEVICES" list and/or remove -# some of the types of binaries from the "PROGRAMS" list to reduce -# the build time (and possibly avoid checking for presence of a component -# you don't need) - - - -# (Optional) Remove from this list the devices you're not interested in building -DEVICES := DM6446 DM355 DM6437 DM648 DM6467 - -# (Optional) Remove from the list the types of programs you're not intersted in -# building: -# APP_CLIENT -- Arm client for codecs running on the DSP, on dual-CPU systems -# DSP_SERVER -- DSP server with the codecs, running on the DSP, on dual-CPUs -# APP_LOCAL -- Client+codecs in a single program, whether Arm only or DSP only -PROGRAMS := APP_CLIENT DSP_SERVER APP_LOCAL - - -# (Mandatory) Specify where various components are installed. -# What you need depends on what device(s) you're building for, what type(s) of -# programs you are building for, and whether your Codec Engine distribution -# is a "big" one that contains all the minor components in its "cetools" -# directory. The legend: -# CE - Codec Engine (needed for Arm and for DSP) -# XDC - XDC tools (Arm and DSP) -# BIOS - DSP/BIOS (DSP only) -# XDAIS - XDAIS header files (Arm and DSP) -# FC - Framework components, various resource managers (ARM and DSP) -# CMEM - Continuous memory manager (Arm only) -# DSPLINK - Arm<->DSP communication software (Arm + DSP) -# -# you can omit directory specifications for the components you think you don't -# need (will be warned if you do, based on your DEVICES + PROGRAMS selection -# above). - -CE_INSTALL_DIR := SEDME_S -XDC_INSTALL_DIR := SEDME_XDCTOOLSUNPACKDIR -BIOS_INSTALL_DIR := SEDME_BIOSUNPACKDIR - -# no need to specify the installation directories below if your CE installation -# has cetools/ directory on top -USE_CETOOLS_IF_EXISTS := 1 -XDAIS_INSTALL_DIR := _your_xDAIS_installation_directory/xdais_6_10_01 -DSPLINK_INSTALL_DIR := _your_DSPLink_installation_directory/dsplink-davinci-v1.50-prebuilt -CMEM_INSTALL_DIR := _your_CMEM_installation_directory/cmem_2_10 -FC_INSTALL_DIR := _your_FC_installation_directory/framework_components_2_10_01 -BIOSUTILS_INSTALL_DIR := _your_BIOSUTILS_installation_directory/biosutils - - -# (Mandatory) specify correct compiler paths and names for the architectures -# you'll be building for: - -# compiler path and name for Montavista Arm 9 toolchain. NOTE: make sure the -# directory you specify has a "bin" subdirectory -CGTOOLS_MVARM9 = /db/toolsrc/library/tools/vendors/mvl/arm/mvl4.0-new/montavista/pro/devkit/arm/v5t_le -CC_MVARM9 = bin/arm_v5t_le-gcc - -# compiler path and name for TI C64x toolchain. NOTE: make sure the -# directory you specify has a "bin" subdirectory -CGTOOLS_C64P = /db/toolsrc/library/tools/vendors/ti/c6x/6.0.16/Linux -CC_C64P = bin/cl6x - -# ----------------------------------------------------------------------------- - -# figure out what categories of devices we are to build for -ifneq (,$(findstring DM6446,$(DEVICES))) - DEVICES_DAVINCI := 1 -endif -ifneq (,$(findstring DM6467,$(DEVICES))) - DEVICES_DAVINCI := 1 -endif -ifneq (,$(findstring DM355,$(DEVICES))) - DEVICES_ARMONLY := 1 -endif -ifneq (,$(findstring DM6437,$(DEVICES))) - DEVICES_DSPONLY := 1 -endif -ifneq (,$(findstring DM648,$(DEVICES))) - DEVICES_DSPONLY := 1 -endif - -# determine which components are necessary based on DEVICES and PROGRAMS -REQUIRE_CE := 1 -REQUIRE_XDC := 1 -REQUIRE_XDAIS := 1 -REQUIRE_FC := 1 - -ifneq (,$(findstring DM6446,$(DEVICES))) - ifneq (, $(findstring APP_CLIENT, $(PROGRAMS) )) - REQUIRE_LINK := 1 - REQUIRE_CMEM := 1 - endif - ifneq (, $(findstring DSP_SERVER, $(PROGRAMS) )) - REQUIRE_LINK := 1 - REQUIRE_BIOS := 1 - endif -endif - -ifneq (,$(findstring DM6467,$(DEVICES))) - ifneq (, $(findstring APP_CLIENT, $(PROGRAMS) )) - REQUIRE_LINK := 1 - REQUIRE_CMEM := 1 - endif - ifneq (, $(findstring DSP_SERVER, $(PROGRAMS) )) - REQUIRE_LINK := 1 - REQUIRE_BIOS := 1 - endif -endif - -ifneq (,$(findstring DM355,$(DEVICES))) - ifneq (, $(findstring APP_LOCAL, $(PROGRAMS) )) - REQUIRE_CMEM := 1 - endif -endif - -ifneq (,$(findstring DM6437,$(DEVICES))) - ifneq (, $(findstring APP_LOCAL, $(PROGRAMS) )) - REQUIRE_BIOS := 1 - endif -endif - -ifneq (,$(findstring DM648,$(DEVICES))) - ifneq (, $(findstring APP_LOCAL, $(PROGRAMS) )) - REQUIRE_BIOS := 1 - endif -endif - - -# Build the XDC path from the necessary components, verifying along the way -# that the required compoments are present -XDC_PATH := - -ERRMSG = which is invalid (could not find file "$(TEST_FILE)"). Set this in <codec engine examples>/xdcpaths.mak! See the build documentation to correct this error. - -# CE_INSTALL_DIR is the location of your Codec Engine. -ifeq ($(REQUIRE_CE), 1) - TEST_FILE := $(CE_INSTALL_DIR)/packages/ti/sdo/ce/package.xdc - ifeq ($(wildcard $(TEST_FILE)),) - $(error CE_INSTALL_DIR is set to "$(CE_INSTALL_DIR)", $(ERRMSG)) - endif - XDC_PATH := $(CE_INSTALL_DIR)/packages -endif - -# Add cetools to XDCPATH if 1) $(USE_CETOOLS_IF_EXISTS) is set, and -# 2) the CE distribution has "cetools/" -USING_CETOOLS := 0 -ifeq ($(USE_CETOOLS_IF_EXISTS), 1) - ifneq ($(wildcard $(CE_INSTALL_DIR)/cetools),) - USING_CETOOLS := 1 - XDC_PATH := $(CE_INSTALL_DIR)/cetools/packages;$(XDC_PATH) - endif -endif -ifeq ($(USING_CETOOLS),0) - # XDAIS_INSTALL_DIR is the location of your XDAIS distribution - ifeq ($(REQUIRE_XDAIS), 1) - TEST_FILE := $(XDAIS_INSTALL_DIR)/packages/ti/xdais/package.xdc - ifeq ($(wildcard $(TEST_FILE)),) - $(error XDAIS_INSTALL_DIR is set to "$(XDAIS_INSTALL_DIR)", $(ERRMSG)) - endif - XDC_PATH := $(XDC_PATH);$(XDAIS_INSTALL_DIR)/packages - endif - - # DSPLINK_INSTALL_DIR is the location of your DSPLINK distribution - ifeq ($(REQUIRE_LINK), 1) - TEST_FILE := $(DSPLINK_INSTALL_DIR)/packages/dsplink/gpp/package.xdc - ifeq ($(wildcard $(TEST_FILE)),) - $(error DSPLINK_INSTALL_DIR is set to "$(DSPLINK_INSTALL_DIR)", $(ERRMSG)) - endif - XDC_PATH := $(XDC_PATH);$(DSPLINK_INSTALL_DIR)/packages - endif - - # CMEM_INSTALL_DIR is the location of your CMEM distribution - ifeq ($(REQUIRE_CMEM), 1) - TEST_FILE := $(CMEM_INSTALL_DIR)/packages/ti/sdo/linuxutils/cmem/package.xdc - ifeq ($(wildcard $(TEST_FILE)),) - $(error CMEM_INSTALL_DIR is set to "$(CMEM_INSTALL_DIR)", $(ERRMSG)) - endif - XDC_PATH := $(XDC_PATH);$(CMEM_INSTALL_DIR)/packages - endif - - # FC_INSTALL_DIR is the location of your Frameworks Components distribution - ifeq ($(REQUIRE_FC), 1) - TEST_FILE := $(FC_INSTALL_DIR)/packages/ti/sdo/fc/dskt2/package.xdc - ifeq ($(wildcard $(TEST_FILE)),) - $(error FC_INSTALL_DIR is set to "$(FC_INSTALL_DIR)", $(ERRMSG)) - endif - XDC_PATH := $(XDC_PATH);$(FC_INSTALL_DIR)/packages - endif - - # BIOSUTILS_INSTALL_DIR is the location of your BIOSUTILS distribution - ifeq ($(REQUIRE_BIOS), 1) - TEST_FILE := $(BIOSUTILS_INSTALL_DIR)/packages/ti/bios/utils/package.xdc - ifeq ($(wildcard $(TEST_FILE)),) - $(error BIOSUTILS_INSTALL_DIR is set to "$(BIOSUTILS_INSTALL_DIR)", $(ERRMSG)) - endif - XDC_PATH := $(XDC_PATH);$(BIOSUTILS_INSTALL_DIR)/packages - endif - -endif - -# BIOS_INSTALL_DIR is the location of your BIOS distribution -ifeq ($(REQUIRE_BIOS), 1) - TEST_FILE := $(BIOS_INSTALL_DIR)/packages/ti/bios/package.xdc - ifeq ($(wildcard $(TEST_FILE)),) - $(error BIOS_INSTALL_DIR is set to "$(BIOS_INSTALL_DIR)", $(ERRMSG)) - endif - XDC_PATH := $(XDC_PATH);$(BIOS_INSTALL_DIR)/packages -endif - -# XDC_INSTALL_DIR is the location of your XDCTOOLS installation. -ifeq ($(REQUIRE_XDC), 1) - TEST_FILE := $(XDC_INSTALL_DIR)/packages/xdc/package.xdc - ifeq ($(wildcard $(TEST_FILE)),) - $(error XDC_INSTALL_DIR is set to "$(XDC_INSTALL_DIR)", $(ERRMSG)) - endif -endif - -# XDC_PATH is complete. Any other components you could add as -# XDC_PATH := <your component>/packages;$(XDC_PATH) diff --git a/packages/dsplink/gstreamer-ti_svn.bb b/packages/dsplink/gstreamer-ti_svn.bb index c4be68c6b4..b7ad411e32 100644 --- a/packages/dsplink/gstreamer-ti_svn.bb +++ b/packages/dsplink/gstreamer-ti_svn.bb @@ -1,8 +1,10 @@ -DEPENDS = "codec-engine dmai gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly libid3tag liboil libmad" +DEPENDS = "ti-codec-engine ti-dmai gstreamer gst-plugins-base gst-plugins-good gst-plugins-ugly libid3tag liboil libmad" SRC_URI = "svn://omapzoom.org/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https" SRCREV = "87" +PR = "r1" + # Again, no '.' in PWD allowed :( PV = "0+svnr${SRCREV}" @@ -12,8 +14,35 @@ inherit autotools require ti-paths.inc +export DMAI_INSTALL_DIR = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai" +export CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine" +export FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools" +export CODEC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combos" + +export XDC_TARGET = "gnu.targets.arm.GCArmv5T" + +XDC_PLATFORM = "foo" +# Assume every TI armv7a cpu is a 3530 +XDC_PLATFORM_armv7a = "ti.platforms.evm3530" +export XDC_PLATFORM + +# We need to add this to config.bld: +#GCArmv5T.cc.$unseal("opts"); +#GCArmv5T.cc.opts = "SEDME_CCARCH"; +#GCArmv5T.cc.$seal("opts"); + +do_compile_prepend() { + for i in $(find ${S} -name "config.bld") ; do + sed -i -e s:SEDME_CCARCH:'${TARGET_CCARCH}': $i + done +} + CPPFLAGS_append = " -DPlatform_${PLATFORM}" PACKAGE_ARCH = "${MACHINE_ARCH}" +RDEPENDS_${PN} = "ti-dmai" +FILES_${PN} += "${libdir}/gstreamer-0.10/*.so" +FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la" +FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" diff --git a/packages/dsplink/readme.txt b/packages/dsplink/readme.txt index f20be41d04..8dd71e6fee 100644 --- a/packages/dsplink/readme.txt +++ b/packages/dsplink/readme.txt @@ -3,7 +3,7 @@ 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 +/DONE - 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 diff --git a/packages/dsplink/ti-codec-combos_3.16.bb b/packages/dsplink/ti-codec-combos_3.16.bb new file mode 100644 index 0000000000..60a976f1c9 --- /dev/null +++ b/packages/dsplink/ti-codec-combos_3.16.bb @@ -0,0 +1,57 @@ +DESCRIPTION = "Codec combos for omap3530" +DEPENDS = "ti-codec-engine" +LICENCE = "unknown" + +require ti-paths.inc + +# TODO update this... +# 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 omap3530_dvsdk_combos_3_16.tar.gz file in the same directory as this recipe +SRC_URI = "file://omap3530_dvsdk_combos_3_16.tar.gz \ + " + +S = "${WORKDIR}/omap3530_dvsdk_combos_3_16" +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "316" +PR = "r10" + +TARGET = "all" + +export CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/packages;${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools" + +do_compile() { + sed -i -e s:/db/toolsrc/library/vendors2005/ti/c6x/6.0.16/Linux:${TITOOLSDIR}/${TICGTOOLSDIR}:g \ + -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g \ + -e s:/home/dvsdkval/workdir/OMAP3530/nfs/workdir/opt/toolchain/arm-2007q3:${CROSS_DIR}:g \ + ${S}/config.bld + + oe_runmake clean + oe_runmake +} + +do_install () { + echo oe_runmake install + + install -d ${D}/${datadir}/ti-codec-combos + + cd ${S} + + # grab the server executables + for i in $(find . -name "*.x64P") ; do + install ${i} ${D}/${datadir}/ti-codec-combos + done + + # should copy the generated data sheets as well for reference +} + +do_stage () { + install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combos + cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combos +} + +FILES_ti-codec-combos = "${datadir}/ti-codec-combos/*" + +INHIBIT_PACKAGE_STRIP = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + diff --git a/packages/dsplink/ti-codec-engine_2.21.bb b/packages/dsplink/ti-codec-engine_2.21.bb new file mode 100644 index 0000000000..805715bd74 --- /dev/null +++ b/packages/dsplink/ti-codec-engine_2.21.bb @@ -0,0 +1,274 @@ +require dsplink.inc + +DESCRIPTION = "Codec Engine for TI ARM/DSP processors" + +DEPENDS = "virtual/kernel perl-native" +RDEPENDS = "update-modules" + +inherit module + +# tconf from xdctools dislikes '.' in pwd :/ +PR = "r14" +PV = "221" + +# Get CE tarball from TI website, place in sources and calculate +# md5sum +# 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://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 \ + file://Makefile-dsplink-gpp \ + file://Makefile-dsplink-dsp \ + file://loadmodules-ti-dsplink-apps.sh \ + file://unloadmodules-ti-dsplink-apps.sh \ + file://loadmodules-ti-codec-engine-apps.sh \ + file://unloadmodules-ti-codec-engine-apps.sh \ +" + +S = "${WORKDIR}/codec_engine_2_21" + +require ti-paths.inc + +export DSPLINK="${S}/cetools/packages/dsplink" + +PARALLEL_MAKE = "" + +# the include files on top define do_compile for the submodules +do_compile_append() { + +#dsplink already done from inclusion of require dsplink.inc + +#lpm bits + if [ -e ${S}/cetools/packages/ti/bios/power/ ] ; then + + # Build the DSP power manager kernel module + cd ${S}/cetools/packages/ti/bios/power/modules/${DSPPOWERSOC}/lpm + + # Still need to move this into the patch file + if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 26 ] ; then + sed -i -e s:asm/semaphore:linux/semaphore: lpm_driver.c + fi + + #what is this for? + rm -f *o + + # lpm also needs KERNEL_INSTALL_DIR and MVTOOL_PREFIX which come from ti-paths.inc + export DSPLINK_REPO=${DSPLINK}/.. + # should move the clean step into the clean stage.. + #oe_runmake clean + oe_runmake + fi + +#cmemk bits + if [ -e ${S}/cetools/packages/ti/sdo/linuxutils/cmem ] ; 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 + #export DSPLINK=${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/dsplink + + # 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 + + cd ${S}/cetools/packages/ti/sdo/linuxutils/cmem + 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 + +#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 + cd ${S}/examples + + # Fix paths to arm crosstools, c6x codegen and x86 gcc + # Also disable uclibc and x86 builds + sed -i -e s:/db/toolsrc/library/tools/vendors/cs/arm/arm-2007q3:${CROSS_DIR}:g \ + -e s:/db/toolsrc/library/tools/vendors/ti/c6x/6.0.16/Linux:${TITOOLSDIR}/${TICGTOOLSDIR}:g \ + -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 + + # For now, remove all targets, except dm6446 and omap3530 + sed -i \ + -e '/evmDM357/d' \ + -e '/evmDM6446/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 \ + xdcpaths.mak + + # Start building the CE examples: codecs, extensions, servers (codec bundles) and ARM side apps + # the DSP side uses CC to point to the c6x codegen, but would get the gcc tool + unset CC + + # Make clean doesn't do what you'd expect, it only cleans stuff you've enabled, so some cruft remains + + # First clean + for i in codecs extensions servers apps ; do + make -e -C ${S}/examples/ti/sdo/ce/examples/$i clean + done + + # Then build the examples + for i in codecs extensions servers apps ; do + make -e -C ${S}/examples/ti/sdo/ce/examples/$i + done +} + +do_install_append () { + #driver - kernel module + install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp + 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} + #install -m 0755 ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/dsplink.lib ${D}/${libdir} + + #sample apps - this is very 64x / v5T specific at the moment - we really need CE to give us this list... + install -d ${D}/${datadir}/ti-codec-engine + # we change pwd so that find gives us relative path to the files, which we use to create the same structure on the target + cd ${S}/examples/ti/sdo/ce + + #test app module un/load scripts + install ${WORKDIR}/loadmodules-ti-dsplink-apps.sh ${D}/${datadir}/ti-dsplink + install ${WORKDIR}/unloadmodules-ti-dsplink-apps.sh ${D}/${datadir}/ti-dsplink + + #ce samples + # first find all the app files named '.out' + for i in $(find . -name "*.out") ; do + # first create the directory + install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}` + # now copy the file + install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}` + done + + # next find all the app files named '.xv5T' + for i in $(find . -name "*.xv5T") ; do + # first create the directory + install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}` + # now copy the file + install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}` + done + + # then find all the app/server files named '.x64P' + for i in $(find . -name "*.x64P") ; do + # first create the directory + install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}` + # now copy the file + install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}` + done + + # finally find all the app files named '.dat' + for i in $(find . -name "*.dat") ; do + # first create the directory + install -d ${D}/${datadir}/ti-codec-engine/`dirname ${i}` + # now copy the file + install ${i} ${D}/${datadir}/ti-codec-engine/`dirname ${i}` + done + + #test app module un/load scripts + install ${WORKDIR}/loadmodules-ti-codec-engine-apps.sh ${D}/${datadir}/ti-codec-engine + install ${WORKDIR}/unloadmodules-ti-codec-engine-apps.sh ${D}/${datadir}/ti-codec-engine + + # we should install the CMEM apps as well here + + # finally, strip targets that we're not supporting here + # - TODO... +} + +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 () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +pkg_postrm_ti-lpm-module () { + update-modules || true +} + +pkg_postinst_ti-cmem-module () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +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}" + +#legacy upgrade helpers +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 ti-sdma-module" + diff --git a/packages/dsplink/ti-dmai_1.20.bb b/packages/dsplink/ti-dmai_1.20.bb new file mode 100644 index 0000000000..60a427cba2 --- /dev/null +++ b/packages/dsplink/ti-dmai_1.20.bb @@ -0,0 +1,90 @@ +DESCRIPTION = "Davinci (and OMAP) Multimedia Application Interface" +DEPENDS = "virtual/kernel ti-codec-engine ti-codec-combos" +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://dmai-update-cpu-name.patch;patch=1 \ + file://dmai-update-fb-display.patch;patch=1 \ + file://dmai-update-v4l2-display.patch;patch=1 \ + file://dmai-do-not-panic-on-mixer-failure.patch;patch=1 \ + file://dmai-support-32bit-align.patch;patch=1 \ + file://dmai-built-with-angstrom.patch;patch=1 \ + file://loadmodules-ti-dmai-apps.sh \ + file://unloadmodules-ti-dmai-apps.sh \ + " + +S = "${WORKDIR}/dmai_1_20_00_06" +# Yes, the xdc stuff still breaks with a '.' in PWD +PV = "120" +PR = "r13" + +TARGET = "all" +TARGET_neuros-osd2 = " dm6446_al dm6446_db" +TARGET_beagleboard = " o3530_al" +TARGET_omap3evm = " o3530_al" + +export CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine" +export FC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-engine/cetools" +export CODEC_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-codec-combos" + +do_compile_prepend_omap3evm() { + +#temp removal of sources that fail to build on evm3530 + if [ -e packages/ti/sdo/dmai/linux/omap3530/Resize.c ]; then + rm packages/ti/sdo/dmai/linux/omap3530/Resize.c + fi + + if [ -e packages/ti/sdo/dmai/linux/omap3530/Framecopy_accel.c ]; then + rm packages/ti/sdo/dmai/linux/omap3530/Framecopy_accel.c + fi +} + +do_compile() { + cd packages/ti/sdo/dmai + oe_runmake clean + oe_runmake ${TARGET} C_FLAGS="-O2 -I${STAGING_INCDIR}" + cd apps + oe_runmake clean + oe_runmake ${TARGET} +} + +do_install () { + install -d ${D}/${datadir}/ti-dmai/apps + + export EXEC_DIR="${D}/${datadir}/ti-dmai/apps" + oe_runmake install + + #test app module un/load scripts + install ${WORKDIR}/loadmodules-ti-dmai-apps.sh ${D}/${datadir}/ti-dmai + install ${WORKDIR}/unloadmodules-ti-dmai-apps.sh ${D}/${datadir}/ti-dmai +} + +do_stage () { + install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai + cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dmai +} + +PACKAGES =+ "ti-dmai-apps" + +ALLOW_EMPTY_${PN} = "1" +RRECOMMENDS_${PN} = "ti-dmai-apps" + +FILES_ti-dmai-apps = "${datadir}/ti-dmai/*" + +pkg_postinst_ti-dmai-apps () { + ln -sf /usr/share/ti-codec-combos/* $D/usr/share/ti-dmai/apps +} + +INHIBIT_PACKAGE_STRIP = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +#add run-time dependencies - note for kernel module we can only use RRECOMMENDS, since modules might be built into the kernel +# and for now we make codecs RRECOMMENDS as well, since not everyone will have them +#RDEPENDS_ti-dmai-apps += "ti-codec-combos" +RRECOMMENDS_ti-dmai-apps += "ti-cmem-module ti-lpm-module ti-dsplink-module ti-codec-combos" + diff --git a/packages/dsplink/ti-paths.inc b/packages/dsplink/ti-paths.inc index eec3602ba5..e5b3373fe5 100644 --- a/packages/dsplink/ti-paths.inc +++ b/packages/dsplink/ti-paths.inc @@ -13,6 +13,10 @@ TIXDCTOOLSDIR ?= "${TITOOLSDIR}/xdctools_3_10_03" # Path under TITOOLSDIR where the dsp toolchain is unpacked TICGTOOLSDIR ?= "cg6x_6_0_16" +# Path to codecs/servers package - this is taken from DVSDK 3.00.00.29 +# - This needs fixing to be x-platform (not just omap3) +#TICODECSDIR ?= "omap3530_dvsdk_combos_3_16" + # export some more variable to point to external TI tools # information is duplicated between the js and make based tools export CE_INSTALL_DIR=${S} @@ -22,11 +26,13 @@ export BIOS_INSTALL_DIR=${TITOOLSDIR}/${TIBIOSDIR} export CGTOOLS_V5T="${CROSS_DIR}" export CC_V5T="bin/${TARGET_PREFIX}gcc" export MVTOOL_PREFIX="${TARGET_PREFIX}" -export CE_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine/cetools" export MVTOOL_DIR="${CROSS_DIR}" +export CSTOOL_PREFIX="${TARGET_PREFIX}" export CSTOOL_DIR="${CROSS_DIR}" export LINUXKERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} +# used by dmai (and gstreamer_ti?) +#export CODEC_INSTALL_DIR=${TITOOLSDIR}/${TICODECSDIR} # This tells codec engine which targets to build DEVICES ?= "DM6446" |