16a0dbb833ec5a9d8cf5f42e95f84baffe719a5b
[glsdk/meta-ti-glsdk.git] / recipes-ti / c6accel / ti-c6accel.inc
1 DESCRIPTION = "TI C6Accel - DSP Software Libraries on ARM"
2 HOMEPAGE = "https://gforge01.dal.design.ti.com/gf/project/dsplib4arm/"
4 SECTION = "devel"
5 LICENSE = "TI TSPA"
7 require recipes-ti/includes/ti-paths.inc
8 require recipes-ti/includes/ti-staging.inc
9 require recipes-ti/includes/ti-eula-unpack.inc
11 PLATFORM_omapl138 = "omapl138"
12 PLATFORM_omap3 = "omap3530"
13 PLATFORM ?= "UNDEFINED_PLATFORM"
15 COMPATIBLE_MACHINE = "(omapl138|omap3)"
17 PROVIDES += "ti-c6accel-apps"
19 # This recipe links statically against kernel dependant stuff, use kernel PR as base and append a local version
20 PR = "${MACHINE_KERNEL_PR}"
21 PR_append = "c"
23 S = "${WORKDIR}/c6accel_${PV}"
25 # http://software-dl.ti.com/dsps/dsps_public_sw/c6000/web/c6accel/latest/index_FDS.html
26 SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/c6000/web/c6accel/latest/exports//c6accel_${PV}_Linux-x86_Setup.bin;name=c6accelbin "
28 BINFILE="c6accel_${PV}_Linux-x86_Setup.bin"
29 TI_BIN_UNPK_CMDS="Y:workdir"
31 DEPENDS = "ti-codec-engine ti-xdais ti-dsplink ti-dspbios" 
32 DEPENDS += "ti-edma3lld ti-cgt6x ti-xdctools ti-framework-components" 
33 DEPENDS += "ti-biosutils" 
35 TIARGS = ' \
36     PLATFORM="${PLATFORM}" \
37     CE_INSTALL_DIR="${CE_INSTALL_DIR}" \
38     XDAIS_INSTALL_DIR="${XDAIS_INSTALL_DIR}" \
39     LINK_INSTALL_DIR="${LINK_INSTALL_DIR}" \
40     CMEM_INSTALL_DIR="${CMEM_INSTALL_DIR}" \
41     EDMA3_LLD_INSTALL_DIR="${EDMA3_LLD_INSTALL_DIR}" \
42     CODEGEN_INSTALL_DIR="${CODEGEN_INSTALL_DIR}" \
43     XDC_INSTALL_DIR="${XDC_INSTALL_DIR}" \
44     FC_INSTALL_DIR="${FC_INSTALL_DIR}" \
45     BIOS_INSTALL_DIR="${BIOS_INSTALL_DIR}" \
46     BIOSUTILS_INSTALL_DIR="${BIOSUTILS_INSTALL_DIR}" \
47     LPM_INSTALL_DIR="${LPM_INSTALL_DIR}" \
48     SERVER_INSTALL_DIR="${CODEC_INSTALL_DIR}" \
49     C6ACCEL_INSTALL_DIR="${S}" \
50     CSTOOL_DIR="${TOOLCHAIN_PATH}" \
51     CSTOOL_PREFIX="${TOOLCHAIN_PATH}/${TARGET_PREFIX}" \
52     LINUXLIBS_INSTALL_DIR="${STAGING_DIR}/${BASE_PACKAGE_ARCH}${HOST_VENDOR}-${HOST_OS}" \
53     CFLAGS=" ${TARGET_CC_ARCH} ${CFLAGS}" LDFLAGS="${LDFLAGS}" \
54 '
56 do_configure() {
57         unset VERBOSE
58         make ${TIARGS} clean
59         sed -i -e 's:-L$(LINUXLIBS_INSTALL_DIR)/lib:-L$(LINUXLIBS_INSTALL_DIR)/lib -L$(LINUXLIBS_INSTALL_DIR)/usr/lib ${LDFLAGS}:' ${S}/soc/app/Makefile
61         # Angstrom 2008 breaks with -Wl,-T, while angstrom 2010 needs it
62         if [ $(${TARGET_PREFIX}gcc -dumpversion | awk -F. '{print $2}') -gt 3 ] ; then
63                 sed -i -e 's: $(XDC_CFG)/linker.cmd: -Wl,-T,$(XDC_CFG)/linker.cmd:g' ${S}/soc/app/Makefile
64         fi
65 }
67 do_compile() {
68     unset VERBOSE
69     make ${TIARGS} all
70 }
72 do_install() {
73     install -d ${D}${C6ACCEL_INSTALL_DIR_RECIPE}
74     cp -pPrf ${S}/* ${D}${C6ACCEL_INSTALL_DIR_RECIPE}
76     # update linker.cmd file to point to sysroot 
77     sed -i ${i} -e s=${S}=${C6ACCEL_INSTALL_DIR}=g ${D}${C6ACCEL_INSTALL_DIR_RECIPE}/soc/app/c6accel_app_config/linker.cmd
79     cd ${S} 
80     make \
81       PLATFORM="${PLATFORM}" \
82       CMEM_INSTALL_DIR="${CMEM_INSTALL_DIR}" \
83       LINK_INSTALL_DIR="${LINK_INSTALL_DIR}" \
84       LPM_INSTALL_DIR="${LPM_INSTALL_DIR}" \
85       C6ACCEL_INSTALL_DIR="${S}" \
86       EXEC_DIR_C6ACCEL="${D}/${installdir}/c6accel-apps" \
87       install
88 }
90 PACKAGES += "ti-c6accel-apps"
91 FILES_ti-c6accel-apps = "${installdir}/c6accel-apps/*"
92 INSANE_SKIP_ti-c6accel-apps = True
93 RDEPENDS_ti-c6accel-apps += "ti-cmem-module ti-dsplink-module"