diff options
Diffstat (limited to 'packages/dsplink')
-rw-r--r-- | packages/dsplink/codec-engine_2.21.bb | 86 | ||||
-rw-r--r-- | packages/dsplink/dsplink.inc | 126 | ||||
-rw-r--r-- | packages/dsplink/ti-codec-engine_2.21.bb | 223 | ||||
-rw-r--r-- | packages/dsplink/ti-dsplink_1.60.bb (renamed from packages/dsplink/dsplink_1.60.bb) | 6 |
4 files changed, 254 insertions, 187 deletions
diff --git a/packages/dsplink/codec-engine_2.21.bb b/packages/dsplink/codec-engine_2.21.bb deleted file mode 100644 index 3ecef31235..0000000000 --- a/packages/dsplink/codec-engine_2.21.bb +++ /dev/null @@ -1,86 +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 = "r9" -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://lpm-make-symbol-warnings-fix.patch;patch=1 \ - 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/dsplink.inc b/packages/dsplink/dsplink.inc index f617a7e3d8..09c8759768 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,11 +39,11 @@ 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/ @@ -65,94 +56,36 @@ do_compile () { make -e -f ${WORKDIR}/Makefile-dsplink-dsp cp -a * ${DSPLINK}/gpp/export/BIN/Linux/${DSPLINKPLATFORM}/RELEASE - -#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 - # 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 } 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 @@ -160,27 +93,18 @@ 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" +RPROVIDES_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/ti-codec-engine_2.21.bb b/packages/dsplink/ti-codec-engine_2.21.bb new file mode 100644 index 0000000000..1c82e53971 --- /dev/null +++ b/packages/dsplink/ti-codec-engine_2.21.bb @@ -0,0 +1,223 @@ +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 = "r9" +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://lpm-make-symbol-warnings-fix.patch;patch=1 \ + 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() { + +#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 + # 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 + +#need to add other modules here, like SDMA, 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 '/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/sdo/linuxutils/cmem/src/module/cmemk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true + # - Not sure what this is... maybe stale + #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 + + #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 + + # 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 + + # finally, strip targets that we're not supporting here + # - TODO... +} + +#FILES_${PN} = "${base_sbindir}" + +PACKAGES =+ "ti-lpm-module ti-cmem-module" + +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-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-cmemk-module () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +pkg_postrm_ti-cmem-module () { + update-modules || true +} + +INHIBIT_PACKAGE_STRIP = "1" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +#legacy upgrade helpers +RPROVIDES_ti-cmem-module += "ti-cmemk-module" + +#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" + diff --git a/packages/dsplink/dsplink_1.60.bb b/packages/dsplink/ti-dsplink_1.60.bb index 127e559319..64fbba7162 100644 --- a/packages/dsplink/dsplink_1.60.bb +++ b/packages/dsplink/ti-dsplink_1.60.bb @@ -17,3 +17,9 @@ SRC_URI = "http://install.tarball.in.source.dir/dsplink_1_60.tar.gz \ S = "${WORKDIR}/dsplink_1_60/dsplink" +require ti-paths.inc + +export DSPLINK="${S}" + +PARALLEL_MAKE = "" + |