diff options
-rw-r--r-- | packages/dsplink/cmemk.inc | 62 | ||||
-rw-r--r-- | packages/dsplink/codec-engine_2.21.bb | 47 | ||||
-rw-r--r-- | packages/dsplink/dsplink-module_1.60.bb | 48 | ||||
-rw-r--r-- | packages/dsplink/dsplink.inc | 137 | ||||
-rw-r--r-- | packages/dsplink/lpm.inc | 59 | ||||
-rw-r--r-- | packages/dsplink/ti-cmemk-module_2.21.bb | 21 | ||||
-rw-r--r-- | packages/dsplink/ti-lpm-module_2.21.bb | 20 |
7 files changed, 107 insertions, 287 deletions
diff --git a/packages/dsplink/cmemk.inc b/packages/dsplink/cmemk.inc deleted file mode 100644 index 2d9a25ad6e..0000000000 --- a/packages/dsplink/cmemk.inc +++ /dev/null @@ -1,62 +0,0 @@ -DESCRIPTION = "Codec Engine for TI ARM/DSP processors - cmemk module" - -DEPENDS = "virtual/kernel perl-native" -RDEPENDS = "update-modules" - -inherit module - -require ti-paths.inc - -export DSPLINK="${S}/cetools/packages/dsplink" - -PARALLEL_MAKE = "" - -SRC_URI += "file://cmemk-class-device-27.diff" - -do_compile_append() { - 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 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 - - - 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}" -} - - -do_install() { - 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 -} - -INHIBIT_PACKAGE_STRIP = "1" - -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 -} - -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/packages/dsplink/codec-engine_2.21.bb b/packages/dsplink/codec-engine_2.21.bb index f84ea10c1a..c8ec81e795 100644 --- a/packages/dsplink/codec-engine_2.21.bb +++ b/packages/dsplink/codec-engine_2.21.bb @@ -1,6 +1,4 @@ require dsplink.inc -require lpm.inc -require cmemk.inc DESCRIPTION = "Codec Engine for TI ARM/DSP processors" @@ -18,9 +16,11 @@ 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://Makefile.dsplink \ file://Makefile-dsplink-kbuild \ - file://Makefile-dsplink-gpp \ + file://Makefile-dsplink-gpp \ + file://Makefile-dsplink-dsp \ " S = "${WORKDIR}/codec_engine_2_21" @@ -45,7 +45,7 @@ do_compile_append() { # 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 \ + 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 \ @@ -69,50 +69,13 @@ do_compile_append() { } -do_install() { - 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 - cp ${S}/cetools/packages/ti/bios/power/${DSPPOWERSOC}/lpm/*.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true -} - -do_stage() { +do_stage_append() { install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine cp -pPr ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine/ } INHIBIT_PACKAGE_STRIP = "1" -PACKAGES =+ "ti-cmemk-module" -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 -} - -PACKAGES =+ "ti-lpm-module" -FILES_ti-lpm-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko" - -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 -} - - FILES_${PN} = "${base_sbindir}" PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/packages/dsplink/dsplink-module_1.60.bb b/packages/dsplink/dsplink-module_1.60.bb deleted file mode 100644 index 232ac1bec8..0000000000 --- a/packages/dsplink/dsplink-module_1.60.bb +++ /dev/null @@ -1,48 +0,0 @@ -# The tconf tool breaks if there is a '.' in your pwd -PR = "r5" -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://Makefile.dsplink \ - file://Makefile-dsplink-kbuild \ -" - -S = "${WORKDIR}/dsplink_1_60/dsplink" - -# Needed for buildscripts -export DSPLINK="${S}" - -inherit module -require ti-paths.inc - -do_configure() { - # Run perl script to create appropriate makefiles (v1.60 and up) - perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 --dspcfg_0=${DSPCFG} --dspos_0=DSPBIOS5XX --gppos=${GPPOS} --comps=ponslrm - - mkdir -p ${S}/dsplink-kbuild-test - cp ${WORKDIR}/Makefile-dsplink-kbuild ${S}/dsplink-kbuild-test/Makefile - - if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 26 ] ; then - sed -i -e s:asm/semaphore:linux/semaphore: ${S}/gpp/src/osal/Linux/user.c - sed -i -e s:asm/semaphore:linux/semaphore: ${S}/gpp/src/osal/Linux/2.6.18/sync.c - fi -} - -do_compile_prepend() { - cd ${S}/dsplink-kbuild-test/ -} - -do_install() { - install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp - cp ${S}/dsplink-kbuild-test/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/ -} - -INHIBIT_PACKAGE_STRIP = "1" - - - diff --git a/packages/dsplink/dsplink.inc b/packages/dsplink/dsplink.inc index 00b62973ff..e4f17aeaeb 100644 --- a/packages/dsplink/dsplink.inc +++ b/packages/dsplink/dsplink.inc @@ -1,8 +1,6 @@ DESCRIPTION = "DSP Link for TI ARM/DSP processors" DEPENDS = "virtual/kernel dsplink-module perl-native" -RDEPENDS_${PN}-module = "update-modules" -RRECOMMENDS_${PN} = "${PN}-module" inherit module @@ -14,6 +12,10 @@ export DSPLINK="${S}" require ti-paths.inc do_configure () { + # Clean up stale binaries + find ${S} -name "*.ko" -delete + find ${S} -name "*.o" -delete + # Run perl script to create appropriate makefiles (v1.60 and up) ( cd ${DSPLINK} @@ -21,8 +23,8 @@ do_configure () { ) if [ $(echo ${KERNEL_VERSION} | cut -c5,6) -gt 26 ] ; then - sed -i -e s:asm/semaphore:linux/semaphore: ${S}/gpp/src/osal/Linux/user.c - sed -i -e s:asm/semaphore:linux/semaphore: ${S}/gpp/src/osal/Linux/2.6.18/sync.c + 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 } @@ -30,8 +32,7 @@ PARALLEL_MAKE = "" do_compile () { unset DISPLAY - sed -i -e s:armv7a:armv7-a:g make/Linux/omap3530_2.6.mk || true - sed -i -e s:armv7a:armv7-a:g cetools/packages/dsplink/make/Linux/omap3530_2.6.mk || true + sed -i -e s:armv7a:armv7-a:g ${DSPLINK}/make/Linux/omap3530_2.6.mk # export various settings to override the defaults in the makefiles export DSP_BASE_CGTOOLS=${TITOOLSDIR}/${TICGTOOLSDIR} @@ -52,47 +53,83 @@ do_compile () { export ARCHIVER_AR=${TARGET_PREFIX}ar export BASE_SABIOS=${DSP_BASE_BIOS} - if [ ! -d ${S}/gpp/BUILD/EXPORT/RELEASE ] ; then - install -d ${S}/gpp/BUILD/EXPORT/RELEASE + if [ ! -d ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE ] ; then + install -d ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE fi - cp ${WORKDIR}/Makefile-dsplink-gpp ${S}/gpp/BUILD/EXPORT/RELEASE/Makefile - cd ${S}/gpp/BUILD/EXPORT/RELEASE/ +#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 - -# oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ -# KERNEL_SRC=${STAGING_KERNEL_DIR} \ -# KDIR=${STAGING_KERNEL_DIR} \ -# KERNEL_VERSION=${KERNEL_VERSION} \ -# CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ -# AR="${KERNEL_AR}" \ -# V=1 ${MAKE_TARGETS} - 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 + +#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 + + # 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 + + 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 ${S}/gpp/BUILD/EXPORT/RELEASE/loopgpp ${D}/${bindir} - install ${S}/gpp/BUILD/EXPORT/RELEASE/messagegpp ${D}/${bindir} -# install ${S}/gpp/BUILD/EXPORT/RELEASE/messagemultigpp ${D}/${bindir} - install ${S}/gpp/BUILD/EXPORT/RELEASE/mpcsxfergpp ${D}/${bindir} -# install ${S}/gpp/BUILD/EXPORT/RELEASE/mplistgpp ${D}/${bindir} - install ${S}/gpp/BUILD/EXPORT/RELEASE/readwritegpp ${D}/${bindir} -# install ${S}/gpp/BUILD/EXPORT/RELEASE/ringiogpp ${D}/${bindir} - install ${S}/gpp/BUILD/EXPORT/RELEASE/scalegpp ${D}/${bindir} || true + install ${DSPLINK}/gpp/BUILD/EXPORT/RELEASE/*gpp ${D}/${bindir} || true install -d ${D}/${datadir}/dsplink - for i in $(find ${S}/dsp/BUILD/ -name "*.out") ; do + for i in $(find ${DSPLINK}/dsp/BUILD/ -name "*.out") ; do install ${i} ${D}/${datadir}/dsplink done install -d ${D}/${libdir} - install -m 0755 ${S}/gpp/BUILD/EXPORT/RELEASE/dsplink.lib ${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 } @@ -102,21 +139,51 @@ do_stage() { cp -pPr ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/dsplink/ } -pkg_postinst_${PN}-module () { - if [ -n "$D" ]; then +pkg_postinst_dsplink-module () { + if [ -n "$D" ]; then + exit 1 + fi + depmod -a + update-modules || true +} + +pkg_postrm_dsplink-module () { + update-modules || true +} + +PACKAGES =+ "dsplink dsplink-module ti-lpm-module ti-cmemk-module" +FILES_dsplink-module = "${sysconfdir} /lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/dsplinkk.ko" +FILES_dsplink = "${bindir}/* ${datadir}/dsplink/* ${libdir}/dsplink.lib" + +FILES_ti-lpm-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko" + +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 +} + +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_${PN}-module () { +pkg_postrm_ti-cmemk-module () { update-modules || true } -PACKAGES =+ "${PN}-module" -FILES_${PN}-module = "${sysconfdir} /lib/modules" -FILES_${PN} = "${bindir}/* ${datadir}/dsplink/*" + INHIBIT_PACKAGE_STRIP = "1" diff --git a/packages/dsplink/lpm.inc b/packages/dsplink/lpm.inc deleted file mode 100644 index 7d15cd4d31..0000000000 --- a/packages/dsplink/lpm.inc +++ /dev/null @@ -1,59 +0,0 @@ -DESCRIPTION = "Codec Engine for TI ARM/DSP processors - power module" - -DEPENDS = "virtual/kernel perl-native dsplink" -RDEPENDS = "update-modules" - -require ti-paths.inc - -PARALLEL_MAKE = "" - -do_compile_append() { - 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 - - unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS - 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=${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ \ - CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ - AR="${KERNEL_AR}" -} - - -do_install() { - install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp - 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 -} - -INHIBIT_PACKAGE_STRIP = "1" - -FILES_ti-lpm-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko" - -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 -} - - -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/packages/dsplink/ti-cmemk-module_2.21.bb b/packages/dsplink/ti-cmemk-module_2.21.bb deleted file mode 100644 index a0bc75fe5e..0000000000 --- a/packages/dsplink/ti-cmemk-module_2.21.bb +++ /dev/null @@ -1,21 +0,0 @@ -# tconf from xdctools dislikes '.' in pwd :/ -PR = "r4" -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 - -inherit module - -SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_21.tar.gz \ - file://Makefile.dsplink \ -" - -S = "${WORKDIR}/codec_engine_2_21" - -do_compile() { - : -} - -require cmemk.inc diff --git a/packages/dsplink/ti-lpm-module_2.21.bb b/packages/dsplink/ti-lpm-module_2.21.bb deleted file mode 100644 index 4a24033afd..0000000000 --- a/packages/dsplink/ti-lpm-module_2.21.bb +++ /dev/null @@ -1,20 +0,0 @@ -# tconf from xdctools dislikes '.' in pwd :/ -PR = "r4" -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://Makefile.dsplink \ - " -inherit module - -S = "${WORKDIR}/codec_engine_2_21" - -do_compile() { - : -} - -require lpm.inc |