task-mamona-wm: adding task-mamona at RDEPENDS
[vuplus_openembedded] / packages / dsplink / dsplink.inc
1 DESCRIPTION = "DSP Link for TI ARM/DSP processors"
2
3 DEPENDS = "virtual/kernel perl-native"
4 RDEPENDS_${PN}-module = "update-modules"
5 RRECOMMENDS_${PN} = "${PN}-module"
6
7 inherit module
8
9 S = "${WORKDIR}/dsplink_1_60/dsplink"
10
11 # Needed for buildscripts
12 export DSPLINK="${S}"
13
14 require ti-paths.inc
15
16 do_configure () {
17         # Run perl script to create appropriate makefiles (v1.60 and up)
18         perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 --dspcfg_0=${DSPCFG} --dspos_0=DSPBIOS5XX  --gppos=${GPPOS} --comps=ponslrm
19 }
20
21 PARALLEL_MAKE = ""
22
23 do_compile () {
24         unset DISPLAY
25         sed -i -e s:armv7a:armv7-a:g make/Linux/omap3530_2.6.mk || true
26
27         # export various settings to override the defaults in the makefiles     
28         export DSP_BASE_CGTOOLS=${TITOOLSDIR}/${TICGTOOLSDIR}
29         export DSP_BASE_BIOS=${TITOOLSDIR}/${TIBIOSDIR}
30         export DSP_BASE_RTDX=${TITOOLSDIR}/${TIBIOSDIR}/packages/ti/rtdx
31         export GPPTOOL_DIR=${CROSS_DIR}
32         export LINUXKERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
33         export LINK_INSTALL_DIR=${DSPLINK}
34         export VARIANT=${DSPLINKSOC}
35         export PLATFORM=${DSPLINKPLATFORM}
36         export BASE_TOOLCHAIN=${CROSS_DIR}
37         export BASE_CGTOOLS=${BASE_TOOLCHAIN}/bin
38         # 'OSINC_PLATFORM' is used in both the dsp and gpp sides...     
39         export OSINC_PLATFORM1=${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(${TARGET_PREFIX}gcc -dumpversion)/include
40         export OSINC_TARGET=${BASE_TOOLCHAIN}/target/usr/include
41
42         # 'ARCHIVER' is being used in the dsp side of the build as well as gpp
43         export ARCHIVER_AR=${TARGET_PREFIX}ar
44         export BASE_SABIOS=${DSP_BASE_BIOS}
45         
46         make -e -f ${WORKDIR}/Makefile.dsplink
47 }
48
49 do_install () {
50         install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
51         cp ${S}/gpp/BUILD/EXPORT/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/
52
53         install -d ${D}/${bindir}
54 #       install ${S}/gpp/BUILD/EXPORT/RELEASE/loopgpp           ${D}/${bindir}
55         install ${S}/gpp/BUILD/EXPORT/RELEASE/messagegpp        ${D}/${bindir}
56         install ${S}/gpp/BUILD/EXPORT/RELEASE/messagemultigpp   ${D}/${bindir}
57         install ${S}/gpp/BUILD/EXPORT/RELEASE/mpcsxfergpp       ${D}/${bindir}
58         install ${S}/gpp/BUILD/EXPORT/RELEASE/mplistgpp         ${D}/${bindir}
59         install ${S}/gpp/BUILD/EXPORT/RELEASE/readwritegpp      ${D}/${bindir}
60         install ${S}/gpp/BUILD/EXPORT/RELEASE/ringiogpp         ${D}/${bindir}
61         install ${S}/gpp/BUILD/EXPORT/RELEASE/scalegpp          ${D}/${bindir} || true
62
63         install -d ${D}/${datadir}/dsplink
64         for i in $(find ${S}/dsp/BUILD/ -name "*.out") ; do
65                 install ${i}  ${D}/${datadir}/dsplink
66         done    
67
68         install -d ${D}/${libdir}
69         install -m 0755 ${S}/gpp/BUILD/EXPORT/RELEASE/dsplink.lib  ${D}/${libdir}
70 }
71
72
73 # Coded Engine and friends need a complete tree, so stage it all
74 do_stage() {
75         install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/dsplink
76         cp -pPr ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/dsplink/ 
77 }
78
79 pkg_postinst_${PN}-module () {
80         if [ -n "$D" ]; then
81                 exit 1
82         fi
83         depmod -a
84         update-modules || true
85 }
86
87 pkg_postrm_${PN}-module () {
88         update-modules || true
89 }
90
91 PACKAGES =+ "${PN}-module"
92 FILES_${PN}-module  = "${sysconfdir} /lib/modules"
93 FILES_${PN} = "${bindir}/* ${datadir}/dsplink/*"
94
95 INHIBIT_PACKAGE_STRIP = "1"
96
97 PACKAGE_ARCH = "${MACHINE_ARCH}" 
98