cloud9-gfx-image: add image with cloud9 and X11
[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 PR = "${MACHINE_KERNEL_PR}"
17 #This is a kernel module, don't set PR directly
18 MACHINE_KERNEL_PR_append = "d"
20 inherit module
22 do_compile() {
23     do_make_scripts
24     unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
26     case ${SOC_FAMILY} in 
27     dm365)
28             modules="cmem edma irq";;
29     omap3)
30             modules="cmem sdma";;
31         dm355)
32             modules="cmem edma irq";;
33     *)
34             modules="cmem"
35     esac
37     for module in $modules ; do
38     cd ${S}/packages/ti/sdo/linuxutils/$module
39     make \
40       LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
41       MVTOOL_PREFIX="${TARGET_PREFIX}" \
42       UCTOOL_PREFIX="${TARGET_PREFIX}" \
43       clean debug release
44     done
45 }
47 do_install () {
48     install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
49     # Install CMEM
50     for module in $(find ${S}/packages/ti/sdo/linuxutils/ -name "*.ko") ; do
51         install -m 0755 $module ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
52     done
53     cd ${S}/packages/ti/sdo/linuxutils/cmem/apps
54     make \
55       LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
56       MVTOOL_PREFIX="${TARGET_PREFIX}" \
57       UCTOOL_PREFIX="${TARGET_PREFIX}" \
58       EXEC_DIR="${D}${installdir}/ti-linuxutils-app/cmem-app" \
59       install
60     # Install EDMA
61     if [ ${SOC_FAMILY} = "dm365" ] ; then
62         cd ${S}/packages/ti/sdo/linuxutils/edma/apps
63         make \
64          LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
65          MVTOOL_PREFIX="${TARGET_PREFIX}" \
66          UCTOOL_PREFIX="${TARGET_PREFIX}" \
67          EXEC_DIR="${D}${installdir}/ti-linuxutils-app/edma-app" \
68          install
69     fi
71     # stage tree - other packages may need this
72     install -d ${D}${LINUXUTILS_INSTALL_DIR_RECIPE}
73     cp -pPrf ${S}/* ${D}${LINUXUTILS_INSTALL_DIR_RECIPE}
74 }
79 PACKAGES =+ " ti-cmem-module \
80               ti-sdma-module \
81               ti-edma-module \
82               ti-irq-module \
83               ti-linuxutils-app"
85 FILES_ti-cmem-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmem*.ko"
86 FILES_ti-sdma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdma*.ko"
87 FILES_ti-edma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/edma*.ko"
88 FILES_ti-irq-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/irq*.ko"
90 FILES_ti-linuxutils-app = "${installdir}/ti-linuxutils-app/*/*"
92 INSANE_SKIP_ti-linuxutils-app = "True"
93 PACKAGE_STRIP = "no"