summaryrefslogtreecommitdiff
path: root/recipes/ti/ti-codec-engine.inc
blob: fee33a672fd0dd913aa0ffe6c296d5920c0483d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
DESCRIPTION = "Codec Engine for TI ARM/DSP processors"

require ti-paths.inc

# compile time dependencies
DEPENDS = "ti-framework-components ti-xdais-native ti-xdctools-native ti-cgt6x-native"

DEPENDS_append_dm6446 	= " ti-dspbios-native ti-linuxutils ti-dsplink-module"
DEPENDS_append_omap3   	= " ti-dspbios-native ti-linuxutils ti-dsplink-module"
DEPENDS_append_omapl138 = " ti-dspbios-native ti-linuxutils ti-dsplink-module"

SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ce/${PV}/exports/codec_engine_${PV}.tar.gz;name=cetarball"

# Set the source directory
S = "${WORKDIR}/codec_engine_${PV}"

# Define Device variable
DEVICES_dm6446 	?= "DM6446"
DEVICES_omap3   ?= "OMAP3530"
DEVICES_dm355   ?= "DM355"
DEVICES_omapl137 ?= "OMAPL137"
DEVICES_omapl138 ?= "OMAPL138"

#define PROGRAM variables
PROGRAMS        ?= "APP_CLIENT DSP_SERVER"
PROGRAMS_dm355   = "APP_LOCAL"

LINK_INSTALL_DIR="${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/ti-dsplink-module/packages"
CGT6x_DIR = "${STAGING_DIR_NATIVE}/ti-cgt6x-native"
XDCTOOLS_DIR = "${STAGING_DIR_NATIVE}/ti-xdctools-native"
CE_INSTALL_DIR = "${S}"

do_compile () {

	sed -i  \
		-e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g \
		${S}/examples/xdcpaths.mak

        for i in codecs extensions servers apps ; do
                cd ${S}/examples/ti/sdo/ce/examples/$i
                make DEVICES="${DEVICES}" \
                     GPPOS="${GPPOS}" \
                     PROGRAMS="${PROGRAMS}" \
                     CE_INSTALL_DIR="${CE_INSTALL_DIR}" \
                     XDC_INSTALL_DIR="${XDCTOOLS_DIR}" \
                     BIOS_INSTALL_DIR="${BIOS_INSTALL_DIR}"\
                     DSPLINK_INSTALL_DIR="${LINK_INSTALL_DIR}" \
                     XDAIS_INSTALL_DIR="${CE_INSTALL_DIR}/cetools" \
                     FC_INSTALL_DIR="${FC_INSTALL_DIR}" \
                     CMEM_INSTALL_DIR="${CMEM_INSTALL_DIR}" \
                     LPM_INSTALL_DIR="${CE_INSTALL_DIR}/cetools" \
                     EDMA3_INSTALL_DIR="${CE_INSTALL_DIR}/cetools" \
                     CGTOOLS_V5T="${CROSS_DIR}"\
                     CGTOOLS_C64P="${CGT6x_DIR}" \
                     CGTOOLS_C674="${CGT6x_DIR}" \
                     clean all
        done
}

do_install() {
	install -d ${D}/${installdir}/codec-engine-apps
	cp ${S}/examples/apps/system_files/${DEVICES}/loadmodules.sh ${D}/${installdir}/codec-engine-apps
	sed -i 's/insmod/modprobe/g' ${D}/${installdir}/codec-engine-apps/loadmodules.sh

	cd ${S}/examples/ti/sdo/ce/examples

	for i in $(find . -name "*.xv5T"); do
		install -d ${D}/${installdir}/codec-engine-apps/`dirname ${i} | cut -f3 -d /`
		install ${i} ${D}/${installdir}/codec-engine-apps/`dirname ${i} | cut -f3 -d /`

    	for j in $(find . -name "*.${DSPSUFFIX}"); do
		install ${j} ${D}/${installdir}/codec-engine-apps/`dirname ${i} | cut -f3 -d /`
    	done

    done
}


# stage tree - other packages may need this
do_stage() {
    install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}
    cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/ 
}

PACKAGE_ARCH = "${MACHINE_ARCH}"
INHIBIT_PACKAGE_STRIP = "1"
PACKAGES += "ti-codec-engine-apps"
FILES_ti-codec-engine-apps = "${installdir}/codec-engine-apps/*"
INSANE_SKIP_ti-codec-engine-apps = True