linux-dm8000: add fixup-memsize patch to use memory size passed from bootloader
[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 DSPLINKPLATFORM ?= "DAVINCI"
17 DSPLINKPLATFORM_omap5912osk = "OMAP"
18 DSPLINKPLATFORM_beagleboard = "OMAP3530"
19 DSPLINKPLATFORM_davinci-sffsdr = "DAVINCI"
20 DSPLINKPLATFORM_davinci-dvevm = "DAVINCI"
21
22 DSPLINKDSP ?= "C64XX"
23
24 DSPLINKSOC ?= "DM6446"
25 DSPLINKSOC_beagleboard = "3530"
26
27 DSPCFG ?= "DM6446GEMSHMEM"
28 DSPCFG_beagleboard ?= "OMAP3530SHMEM"
29
30 GPPOS ?= "DAVINCILSP"
31 GPPOS_beagleboard = "OMAPLSP"
32
33 export DSPLINKPLATFORM 
34 export DSPLINKDSP
35 export DSPLINKSOC
36 export DSPCFG
37 export GPPOS
38
39 do_configure () {
40
41 # Run perl script to create appropriate makefiles (v1.60 and up)
42 DSPLINK=${S} perl config/bin/dsplinkcfg.pl --platform=${DSPLINKPLATFORM} --nodsp=1 --dspcfg_0=${DSPCFG} --dspos_0=DSPBIOS5XX  --gppos=${GPPOS} --comps=ponslrm
43
44 }
45
46 PARALLEL_MAKE = ""
47
48 do_compile () {
49         unset DISPLAY
50         sed -i -e s:armv7a:armv7-a:g make/Linux/omap3530_2.6.mk || true
51
52         # export various settings to override the defaults in the makefiles     
53         export DSP_BASE_CGTOOLS=${TITOOLSDIR}/${TICGTOOLSDIR}
54         export DSP_BASE_BIOS=${TITOOLSDIR}/${TIBIOSDIR}
55         export DSP_BASE_RTDX=${TITOOLSDIR}/${TIBIOSDIR}/packages/ti/rtdx
56         export GPPTOOL_DIR=${CROSS_DIR}
57         export LINUXKERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR}
58         export LINK_INSTALL_DIR=${S}
59         export VARIANT=${DSPLINKSOC}
60         export PLATFORM=${DSPLINKPLATFORM}
61         export BASE_TOOLCHAIN=${CROSS_DIR}
62         export BASE_CGTOOLS=${BASE_TOOLCHAIN}/bin
63         export OSINC_PLATFORM1=${CROSS_DIR}/lib/gcc/${TARGET_SYS}/$(${TARGET_PREFIX}gcc -dumpversion)/include
64         export OSINC_TARGET=${BASE_TOOLCHAIN}/target/usr/include
65         export ARCHIVER_AR=${TARGET_PREFIX}ar
66         export BASE_SABIOS=${DSP_BASE_BIOS}
67         
68         make -e -f ${WORKDIR}/Makefile.dsplink
69 }
70
71 do_install () {
72         install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
73         cp ${S}/gpp/BUILD/EXPORT/RELEASE/dsplinkk.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/
74
75         install -d ${D}/${bindir}
76 #       install ${S}/gpp/BUILD/EXPORT/RELEASE/loopgpp           ${D}/${bindir}
77         install ${S}/gpp/BUILD/EXPORT/RELEASE/messagegpp        ${D}/${bindir}
78         install ${S}/gpp/BUILD/EXPORT/RELEASE/messagemultigpp   ${D}/${bindir}
79         install ${S}/gpp/BUILD/EXPORT/RELEASE/mpcsxfergpp       ${D}/${bindir}
80         install ${S}/gpp/BUILD/EXPORT/RELEASE/mplistgpp         ${D}/${bindir}
81         install ${S}/gpp/BUILD/EXPORT/RELEASE/readwritegpp      ${D}/${bindir}
82         install ${S}/gpp/BUILD/EXPORT/RELEASE/ringiogpp         ${D}/${bindir}
83         install ${S}/gpp/BUILD/EXPORT/RELEASE/scalegpp          ${D}/${bindir}
84
85         install -d ${D}/${datadir}/dsplink
86         for i in $(find ${S}/dsp/BUILD/ -name "*.out") ; do
87                 install ${i}  ${D}/${datadir}/dsplink
88         done    
89
90         install -d ${D}/${libdir}
91         install -m 0755 ${S}/gpp/BUILD/EXPORT/RELEASE/dsplink.lib  ${D}/${libdir}
92 }
93
94
95 # Coded Engine and friends need a complete tree, so stage it all
96 do_stage() {
97         install -d ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/dsplink
98         cp -pPr ${S}/* ${STAGING_DIR}/${MULTIMACH_TARGET_SYS}/dsplink/ 
99 }
100
101 pkg_postinst_${PN}-module () {
102         if [ -n "$D" ]; then
103                 exit 1
104         fi
105         depmod -a
106         update-modules || true
107 }
108
109 pkg_postrm_${PN}-module () {
110         update-modules || true
111 }
112
113 PACKAGES =+ "${PN}-module"
114 FILES_${PN}-module  = "${sysconfdir} /lib/modules"
115 FILES_${PN} = "${bindir}/* ${datadir}/dsplink/*"
116
117 INHIBIT_PACKAGE_STRIP = "1"
118
119 PACKAGE_ARCH = "${MACHINE_ARCH}" 
120