import codec engine and dependencies from oe classic
[glsdk/meta-ti-glsdk.git] / recipes-ti / linuxutils / ti-linuxutils.inc
1 DESCRIPTION = "MFP Linux utils for TI ARM/DSP processors"
2 SECTION = "devel"
3 LICENSE = "GPLv2,BSD"
5 BASE_SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/linuxutils/${PV}/exports"
6 SRC_URI = "${BASE_SRC_URI}/linuxutils_${PV}.tar.gz "
8 LIC_FILES_CHKSUM = "file://gpl_2.0.txt;md5=1298794fc2eed3df92a89f3c9d317440"
10 S = "${WORKDIR}/linuxutils_${PV}"
12 require recipes-ti/includes/ti-paths.inc
13 require recipes-ti/includes/ti-staging.inc
15 #This is a kernel module, don't set PR directly
16 MACHINE_KERNEL_PR_append = "d"
18 inherit module
20 do_compile() {
21     unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
23     case ${SOC_FAMILY} in 
24     dm365)
25             modules="cmem edma irq";;
26     omap3)
27             modules="cmem sdma";;
28         dm355)
29             modules="cmem edma irq";;
30     *)
31             modules="cmem"
32     esac
34     for module in $modules ; do
35     cd ${S}/packages/ti/sdo/linuxutils/$module
36     make \
37       LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
38       MVTOOL_PREFIX="${TARGET_PREFIX}" \
39       UCTOOL_PREFIX="${TARGET_PREFIX}" \
40       clean debug release
41     done
42 }
44 do_install () {
45     install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
46     # Install CMEM
47     for module in $(find ${S}/packages/ti/sdo/linuxutils/ -name "*.ko") ; do
48         install -m 0755 $module ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
49     done
50     cd ${S}/packages/ti/sdo/linuxutils/cmem/apps
51     make \
52       LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
53       MVTOOL_PREFIX="${TARGET_PREFIX}" \
54       UCTOOL_PREFIX="${TARGET_PREFIX}" \
55       EXEC_DIR="${D}${installdir}/ti-linuxutils-app/cmem-app" \
56       install
57     # Install EDMA
58     if [ ${SOC_FAMILY} = "dm365" ] ; then
59         cd ${S}/packages/ti/sdo/linuxutils/edma/apps
60         make \
61          LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
62          MVTOOL_PREFIX="${TARGET_PREFIX}" \
63          UCTOOL_PREFIX="${TARGET_PREFIX}" \
64          EXEC_DIR="${D}${installdir}/ti-linuxutils-app/edma-app" \
65          install
66     fi
68     # stage tree - other packages may need this
69     install -d ${D}${LINUXUTILS_INSTALL_DIR_RECIPE}
70     cp -pPrf ${S}/* ${D}${LINUXUTILS_INSTALL_DIR_RECIPE}
71 }
76 PACKAGES =+ " ti-cmem-module \
77               ti-sdma-module \
78               ti-edma-module \
79               ti-irq-module \
80               ti-linuxutils-app"
82 FILES_ti-cmem-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmem*.ko"
83 FILES_ti-sdma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdma*.ko"
84 FILES_ti-edma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/edma*.ko"
85 FILES_ti-irq-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/irq*.ko"
87 FILES_ti-linuxutils-app = "${installdir}/ti-linuxutils-app/*/*"
89 INSANE_SKIP_ti-linuxutils-app = "True"
90 PACKAGE_STRIP = "no"