Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[vuplus_openembedded] / packages / dsplink / codec-engine_2.21.bb
1 require dsplink.inc
2
3 DESCRIPTION = "Codec Engine for TI ARM/DSP processors"
4
5 DEPENDS = "virtual/kernel perl-native"
6 RDEPENDS = "update-modules"
7
8 inherit module
9
10 # tconf from xdctools dislikes '.' in pwd :/
11 PR = "r8"
12 PV = "221"
13
14 # Get CE tarball from TI website, place in sources and calculate
15 # md5sum
16 # Look for tarball at https://www-a.ti.com/downloads/sds_support/targetcontent/CE/index.html
17
18 SRC_URI = "http://install.tarball.in.source.dir/codec_engine_2_21.tar.gz \
19            file://cmem-class-device-27-and-sched-include-fix.patch;patch=1 \
20            file://dsplink-semaphore-27.patch;patch=1 \
21            file://lpm-device-create-and-semaphore-include-fix.patch;patch=1 \
22            file://Makefile.dsplink \
23            file://Makefile-dsplink-kbuild \
24            file://Makefile-dsplink-gpp \
25            file://Makefile-dsplink-dsp \
26 "
27
28 S = "${WORKDIR}/codec_engine_2_21"
29
30 require ti-paths.inc
31
32 export DSPLINK="${S}/cetools/packages/dsplink"
33
34 PARALLEL_MAKE = ""
35
36 # the include files on top define do_compile for the submodules 
37 do_compile_append() {
38         cd ${S}/examples
39
40         # Fix paths to arm crosstools, c6x codegen and x86 gcc
41         # Also disable uclibc and x86 builds
42         sed -i -e s:/db/toolsrc/library/tools/vendors/cs/arm/arm-2007q3:${CROSS_DIR}:g \
43         -e s:/db/toolsrc/library/tools/vendors/ti/c6x/6.0.16/Linux:${TITOOLSDIR}/${TICGTOOLSDIR}:g \
44         -e s:/db/toolsrc/library/tools/vendors/opensource/gcc/4.1.0/Linux/gcc-4.1.0-glibc-2.3.6/i686-unknown-linux-gnu:/usr:g \
45         -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g \
46         -e 's:true, // build for uC Linux:false,:g' \
47         -e 's:true,  // build for PC Linux:false,:g' \
48         ${S}/examples/user.bld
49
50         # For now, remove all targets, except dm6446 and omap3530
51         sed -i \
52         -e '/evmDM357/d' \
53         -e '/evmDM6467/d' \
54         -e '/evmDM355/d' \
55         -e '/evmDM6437/d' \
56         -e '/evmDM648/d' \
57         -e '/sdp3430/d' \
58         -e '/evm2530/d' \
59         ${S}/examples/user.bld
60
61         # Fix path to c6x codegen
62         sed -i -e s:/db/toolsrc/library/tools/vendors/ti/c6x/6.0.16/Linux:${TITOOLSDIR}/${TICGTOOLSDIR}:g \
63                 xdcpaths.mak
64         
65         # Start building the CE examples: codecs, extensions, servers (codec bundles) and ARM side apps 
66         # the DSP side uses CC to point to the c6x codegen, but would get the gcc tool
67         unset CC
68         # Make clean doesn't do what you'd expect, it only cleans stuff you've enabled, so some cruft remains   
69         for i in codecs extensions servers apps ; do
70                 make -e -C ${S}/examples/ti/sdo/ce/examples/$i clean    
71                 make -e -C ${S}/examples/ti/sdo/ce/examples/$i
72         done    
73
74 }
75
76
77 do_stage_append() {
78         install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine
79     cp -pPrf ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine/
80         ln -sf ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine/packages/ti/sdo/ce ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/codecengine/cetools/packages/ti/sdo/
81 }
82
83 INHIBIT_PACKAGE_STRIP = "1"
84
85 FILES_${PN} = "${base_sbindir}"
86
87 PACKAGE_ARCH = "${MACHINE_ARCH}"