summaryrefslogtreecommitdiffstats
path: root/recipes-ti/gstreamer-ti/gstreamer-ti.inc
diff options
context:
space:
mode:
authorEnrico Butera <ebutera@users.berlios.de>2011-08-08 19:07:32 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-08-16 09:46:08 +0200
commit8ae4464e9f1cba501b99c90141c154cee98fce64 (patch)
tree88369169aa1b568ebd242622f427c5c8bbd60b5b /recipes-ti/gstreamer-ti/gstreamer-ti.inc
parentf3e46c9bbe77dd8937c2667dfa55f731be31c636 (diff)
downloadmeta-ti-8ae4464e9f1cba501b99c90141c154cee98fce64.tar.gz
gstreamer-ti: import from oe classic and fix build
Note: c6accel support is disabled. Signed-off-by: Enrico Butera <ebutera@users.berlios.de> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-ti/gstreamer-ti/gstreamer-ti.inc')
-rw-r--r--recipes-ti/gstreamer-ti/gstreamer-ti.inc148
1 files changed, 148 insertions, 0 deletions
diff --git a/recipes-ti/gstreamer-ti/gstreamer-ti.inc b/recipes-ti/gstreamer-ti/gstreamer-ti.inc
new file mode 100644
index 00000000..ba1c1a2e
--- /dev/null
+++ b/recipes-ti/gstreamer-ti/gstreamer-ti.inc
@@ -0,0 +1,148 @@
1DESCRIPTION = "GSTREAMER Plugin (gstreamer-ti) for TI ARM/DSP processors"
2HOMEPAGE = "https://gforge.ti.com/gf/project/gstreamer_ti/"
3SECTION = "multimedia"
4LICENSE = "LGPL"
5
6# TODO :: Replace omapl137 with official support in GST (currently linking to omapl138)
7# TODO :: Codec Server Environment Variables shouldn't be required
8# TODO :: Add (and check) rc scripts for all targets (just copied for now) (365,6467,omapl137)
9# TODO :: Check if CPPFLAGS_append is still required
10# TODO :: Remove ENCODE/DECODE combo exports - these are not used anymore (check?)
11
12inherit autotools
13inherit update-rc.d
14require recipes-ti/includes/ti-paths.inc
15require recipes-ti/includes/ti-staging.inc
16
17# Rebuild on kernel change since it links statically to ti-dmai, ti-codec-engine, etc
18PR = "r83+${MACHINE_KERNEL_PR}"
19
20DEPENDS = "ti-dmai gstreamer gst-plugins-base"
21
22# enable c6accel elements on omapl138 and omap3
23#DEPENDS_append_omapl138 = " ti-c6accel "
24#EXTRA_OECONF_omapl138 = "--enable-c6accel"
25#DEPENDS_append_omap3 = " ti-c6accel "
26#EXTRA_OECONF_omap3 = "--enable-c6accel"
27export C6ACCEL_INSTALL_DIR
28
29# gstreamer_ti picks up some config variables from the environment
30# - variables are used in the gstreamer makefile
31# - PLATFORM, XDC_PLATFORM, XDC_TARGET, MVTOOL_DIR
32# - others used by config.bld (which it gets from the dmai config.bld)
33# - CROSS_COMPILE, PLATFORM_XDC
34
35PLATFORM_dm6446 = "dm6446"
36PLATFORM_dm6467 = "dm6467"
37PLATFORM_dm6467t = "dm6467t"
38PLATFORM_omap3 = "omap3530"
39PLATFORM_dm355 = "dm355"
40PLATFORM_dm365 = "dm365"
41PLATFORM_omapl137 = "omapl137"
42PLATFORM_omapl138 = "omapl138"
43PLATFORM ?= "UNDEFINED_PLATFORM"
44GST_TI_PLATFORM = ${PLATFORM}
45
46XDC_PLATFORM_dm6446 = "ti.platforms.evmDM6446"
47XDC_PLATFORM_dm6467 = "ti.platforms.evmDM6467"
48XDC_PLATFORM_omap3 = "ti.platforms.evm3530"
49XDC_PLATFORM_dm355 = "ti.platforms.evmDM355"
50XDC_PLATFORM_dm365 = "ti.platforms.evmDM365"
51XDC_PLATFORM_omapl137 = "ti.platforms.evmOMAPL137"
52XDC_PLATFORM_omapl138 = "ti.platforms.evmOMAPL138"
53XDC_PLATFORM ?= "UNDEFINED_XDC_PLATFORM"
54
55export PLATFORM
56export GST_TI_PLATFORM
57export XDC_PLATFORM
58export XDC_TARGET = "gnu.targets.arm.GCArmv5T"
59export PLATFORM_XDC = ${XDC_PLATFORM}
60export CSTOOL_DIR = "${TOOLCHAIN_PATH}"
61export MVTOOL_DIR = "${TOOLCHAIN_PATH}"
62export MVTOOL_PREFIX = "${TARGET_PREFIX}"
63export CROSS_COMPILE = "${TOOLCHAIN_PATH}/${TARGET_PREFIX}"
64export LINK_XDC_ROOT = "${LINK_INSTALL_DIR}"
65
66# export codec combo (or server) locations
67# Why do we need to do this?? - These will get picked up from CODEC_INSTALL_DIR?
68# Sould only need this if we change from default server
69
70export CODEC_SERVER = "${installdir}/ti-codecs-server/cs.x64P"
71CPPFLAGS_append = " -DPlatform_${PLATFORM}"
72
73# We are still using encode/decode combo for DM6446
74export ENCODE_COMBO = "${installdir}/ti-codecs-server/encodeCombo.x64P"
75export DECODE_COMBO = "${installdir}/ti-codecs-server/decodeCombo.x64P"
76# Makefile also expects to be able to find the kernel headers from the envirionment
77export LINUXKERNEL_INSTALL_DIR = "${STAGING_KERNEL_DIR}"
78
79do_configure_prepend() {
80 # PSP kernel is based on older DSS. we need to replace linux/omapfb.h with mach/omapfb.h
81 if ! [ -e ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ] ; then
82 sed -i -e s:linux/omapfb:mach/omapfb:g ${S}/src/omapfb.h || true
83 fi
84
85 # Angstrom 2008 breaks with -Wl,-T, while angstrom 2010 needs it
86 if [ $(${TARGET_PREFIX}gcc -dumpversion | awk -F. '{print $2}') -gt 3 ] ; then
87 # Fix up linkerscripts, recent toolchains need -T to prepend the default script to the custom one
88 for makefile in $(find ${S} -name "Makefile.am") ; do
89 sed -i -e 's:-Wl,$(XDC_CONFIG_BASENAME)/linker.cmd:-Wl,-T,$(XDC_CONFIG_BASENAME)/linker.cmd:g' $makefile
90 done
91 fi
92}
93
94do_compile() {
95 # Recent kernel headers warn against inclusion from userspace
96 for makefile in $(find ${S} -name "Makefile") ; do
97 sed -i -e s:-Werror::g $makefile
98 done
99
100 oe_runmake
101}
102
103do_install_prepend () {
104
105 install -d ${D}/${installdir}/gst/${PLATFORM}
106
107 # copy gstreamer demo scripts
108 cp -R ${WORKDIR}/gstreamer_ti/gstreamer_demo/shared ${D}/${installdir}/gst
109
110 # If we have loadmodules.sh in WORKDIR then give preference to this over
111 # the default gst-ti loadmdules.sh
112 if [ -f ${WORKDIR}/loadmodules.sh ]; then
113 cp ${WORKDIR}/loadmodules.sh ${D}/${installdir}/gst/${PLATFORM}
114 else
115 cp -R ${WORKDIR}/gstreamer_ti/gstreamer_demo/${PLATFORM} ${D}/${installdir}/gst
116 fi
117
118 # delete .svn files
119 find ${D}/${installdir}/gst -name .svn -type d | xargs rm -rf
120 chmod 0755 ${D}/${installdir}/gst -R
121
122 install -d ${D}${sysconfdir}/init.d/
123 install -m 0755 ${WORKDIR}/gstreamer-ti-rc.sh ${D}${sysconfdir}/init.d/gstti-init
124
125 sed -i -e 's|<platform>|${PLATFORM}|g' ${D}${sysconfdir}/init.d/gstti-init
126}
127
128RRECOMMENDS_${PN}_append_dm6446 += "ti-codecs-dm6446-server ti-cmem-module ti-dsplink-module"
129RRECOMMENDS_${PN}_append_dm6467 += "ti-codecs-dm6467 ti-cmem-module ti-dsplink-module"
130RRECOMMENDS_${PN}_append_omap3 += "ti-codecs-omap3530-server ti-cmem-module ti-dsplink-module ti-lpm-module ti-sdma-module"
131RRECOMMENDS_${PN}_append_dm355 += "ti-codecs-dm355 ti-cmem-module ti-dm355mm-module"
132RRECOMMENDS_${PN}_append_dm365 += "ti-codecs-dm365 ti-cmem-module ti-dm365mm-module ti-edma-module ti-irq-module"
133RRECOMMENDS_${PN}_append_omapl137 += "ti-codecs-omapl137-server ti-cmem-module ti-dsplink-module"
134RRECOMMENDS_${PN}_append_omapl138 += "ti-codecs-omapl138-server ti-cmem-module ti-dsplink-module"
135
136FILES_${PN} += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir}"
137FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la"
138FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
139
140pkg_postinst_${PN} () {
141 if [ -d ${installdir}/ti-codecs-server/ ]; then
142 ln -sf ${installdir}/ti-codecs-server/* ${installdir}/gst/${PLATFORM}/
143 fi
144}
145
146INITSCRIPT_NAME = "gstti-init"
147INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
148