ti-linux-utils: ensure fixdep exists before trying to build modules
[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     do_make_scripts
22     unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
24     case ${SOC_FAMILY} in 
25     dm365)
26             modules="cmem edma irq";;
27     omap3)
28             modules="cmem sdma";;
29         dm355)
30             modules="cmem edma irq";;
31     *)
32             modules="cmem"
33     esac
35     for module in $modules ; do
36     cd ${S}/packages/ti/sdo/linuxutils/$module
37     make \
38       LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
39       MVTOOL_PREFIX="${TARGET_PREFIX}" \
40       UCTOOL_PREFIX="${TARGET_PREFIX}" \
41       clean debug release
42     done
43 }
45 do_install () {
46     install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
47     # Install CMEM
48     for module in $(find ${S}/packages/ti/sdo/linuxutils/ -name "*.ko") ; do
49         install -m 0755 $module ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
50     done
51     cd ${S}/packages/ti/sdo/linuxutils/cmem/apps
52     make \
53       LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
54       MVTOOL_PREFIX="${TARGET_PREFIX}" \
55       UCTOOL_PREFIX="${TARGET_PREFIX}" \
56       EXEC_DIR="${D}${installdir}/ti-linuxutils-app/cmem-app" \
57       install
58     # Install EDMA
59     if [ ${SOC_FAMILY} = "dm365" ] ; then
60         cd ${S}/packages/ti/sdo/linuxutils/edma/apps
61         make \
62          LINUXKERNEL_INSTALL_DIR="${STAGING_KERNEL_DIR}" \
63          MVTOOL_PREFIX="${TARGET_PREFIX}" \
64          UCTOOL_PREFIX="${TARGET_PREFIX}" \
65          EXEC_DIR="${D}${installdir}/ti-linuxutils-app/edma-app" \
66          install
67     fi
69     # stage tree - other packages may need this
70     install -d ${D}${LINUXUTILS_INSTALL_DIR_RECIPE}
71     cp -pPrf ${S}/* ${D}${LINUXUTILS_INSTALL_DIR_RECIPE}
72 }
77 PACKAGES =+ " ti-cmem-module \
78               ti-sdma-module \
79               ti-edma-module \
80               ti-irq-module \
81               ti-linuxutils-app"
83 FILES_ti-cmem-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/cmem*.ko"
84 FILES_ti-sdma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/sdma*.ko"
85 FILES_ti-edma-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/edma*.ko"
86 FILES_ti-irq-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/irq*.ko"
88 FILES_ti-linuxutils-app = "${installdir}/ti-linuxutils-app/*/*"
90 INSANE_SKIP_ti-linuxutils-app = "True"
91 PACKAGE_STRIP = "no"