1 DESCRIPTION = "Codec Engine for TI ARM/DSP processors - power module"
3 DEPENDS = "virtual/kernel perl-native dsplink"
4 RDEPENDS = "update-modules"
8 # tconf from xdctools dislikes '.' in pwd :/
12 # Get CE tarball from TI website, place in sources and calculate
14 # Look for tarball at https://www-a.ti.com/downloads/sds_support/targetcontent/CE/index.html
16 SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_21_00_06.tar.gz \
17 file://Makefile.dsplink \
20 S = "${WORKDIR}/codec_engine_2_21_00_06"
27 echo "MVTOOL_PREFIX=${TARGET_PREFIX}" > ${S}/Rules.make
28 echo "UCTOOL_PREFIX=${TARGET_PREFIX}" >> ${S}/Rules.make
29 echo "LINUXKERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}" >> ${S}/Rules.make
31 # Build the DSP power manager kernel module
32 cd ${S}/cetools/packages/ti/bios/power
34 # Unpack all kernel sources for the DSP power manager module
35 for dsp in $(ls | grep bld | awk -F, '{print $2}' | awk -F_ '{print $1}') ; do
36 if ! [ -e $dsp ] ; then tar xf ti_bios_power,${dsp}_bld.tar ; fi
41 export KERNEL_DIR=${STAGING_KERNEL_DIR}
42 export TOOL_PREFIX=${TARGET_PREFIX}
44 # Different SoCs use different toolchains by default, we just want them to use the OE one, so replace the entries because they can't be overloaded within the environment
45 sed -i -e s:/db/toolsrc/library/tools/vendors/mvl/arm/omap3/OMAP35x_SDK_0.9.7/src/linux/kernel_org/2.6_kernel:${STAGING_KERNEL_DIR}:g \
46 -e s:/db/toolsrc/library/tools/vendors/cs/arm/arm-2007q3/bin/arm-none-linux-gnueabi-:${TARGET_PREFIX}:g \
47 -e s:/db/atree/library/trees/power/power-d02x/imports:${STAGING_DIR}/${MULTIMACH_TARGET_SYS}:g \
48 -e s:/db/toolsrc/library/tools/vendors/mvl/arm/dm6446/REL_LSP_02_00_00_010/montavista/pro/devkit/lsp/ti-davinci/linux-2.6.18_pro500:${STAGING_KERNEL_DIR}:g \
49 -e s:/db/toolsrc/library/tools/vendors/mvl/arm/mvl5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-:${TARGET_PREFIX}:g \
52 oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \
53 KERNEL_SRC=${STAGING_KERNEL_DIR} \
54 KERNEL_VERSION=${KERNEL_VERSION} \
55 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
61 install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
62 cp ${S}/cetools/packages/ti/bios/power/${DSPPOWERSOC}/lpm/*.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp || true
65 INHIBIT_PACKAGE_STRIP = "1"
67 FILES_ti-lpm-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/*lpm*ko"
69 pkg_postinst_ti-lpm-module () {
74 update-modules || true
77 pkg_postrm_ti-lpm-module () {
78 update-modules || true
82 PACKAGE_ARCH = "${MACHINE_ARCH}"