diff options
Diffstat (limited to 'recipes-ti/linuxutils/ti-linuxutils.inc')
-rw-r--r-- | recipes-ti/linuxutils/ti-linuxutils.inc | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/recipes-ti/linuxutils/ti-linuxutils.inc b/recipes-ti/linuxutils/ti-linuxutils.inc new file mode 100644 index 00000000..2492b5c6 --- /dev/null +++ b/recipes-ti/linuxutils/ti-linuxutils.inc | |||
@@ -0,0 +1,90 @@ | |||
1 | DESCRIPTION = "MFP Linux utils for TI ARM/DSP processors" | ||
2 | SECTION = "devel" | ||
3 | LICENSE = "GPLv2,BSD" | ||
4 | |||
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 " | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://gpl_2.0.txt;md5=1298794fc2eed3df92a89f3c9d317440" | ||
9 | |||
10 | S = "${WORKDIR}/linuxutils_${PV}" | ||
11 | |||
12 | require recipes-ti/includes/ti-paths.inc | ||
13 | require recipes-ti/includes/ti-staging.inc | ||
14 | |||
15 | #This is a kernel module, don't set PR directly | ||
16 | MACHINE_KERNEL_PR_append = "d" | ||
17 | |||
18 | inherit module | ||
19 | |||
20 | do_compile() { | ||
21 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | ||
22 | |||
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 | ||
33 | |||
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 | } | ||
43 | |||
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 | ||
67 | |||
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 | } | ||
72 | |||
73 | |||
74 | |||
75 | |||
76 | PACKAGES =+ " ti-cmem-module \ | ||
77 | ti-sdma-module \ | ||
78 | ti-edma-module \ | ||
79 | ti-irq-module \ | ||
80 | ti-linuxutils-app" | ||
81 | |||
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" | ||
86 | |||
87 | FILES_ti-linuxutils-app = "${installdir}/ti-linuxutils-app/*/*" | ||
88 | |||
89 | INSANE_SKIP_ti-linuxutils-app = "True" | ||
90 | PACKAGE_STRIP = "no" | ||