summaryrefslogtreecommitdiffstats
path: root/recipes-ti/gstreamer-ti
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-09-02 12:09:28 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-09-02 12:12:40 +0200
commitd37b88a40d8fc712b1e1578c9865e22438fb9ed5 (patch)
tree404c4c2bcf7a3a4fa83f570dced958e0e9aab402 /recipes-ti/gstreamer-ti
parent34d96f765c4fb043d1c6ca744c88aadb884b9be1 (diff)
downloadmeta-ti-d37b88a40d8fc712b1e1578c9865e22438fb9ed5.tar.gz
gstreamer-ti: add native system unit file
systemd will only run the platform script if the right bootargs are passed, so no more cmem suprises! Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-ti/gstreamer-ti')
-rw-r--r--recipes-ti/gstreamer-ti/gstreamer-ti.inc21
-rw-r--r--recipes-ti/gstreamer-ti/gstreamer-ti/gstti-init.service10
-rw-r--r--recipes-ti/gstreamer-ti/gstreamer-ti_svn.bb5
3 files changed, 31 insertions, 5 deletions
diff --git a/recipes-ti/gstreamer-ti/gstreamer-ti.inc b/recipes-ti/gstreamer-ti/gstreamer-ti.inc
index 422d8c7e..789ebb4c 100644
--- a/recipes-ti/gstreamer-ti/gstreamer-ti.inc
+++ b/recipes-ti/gstreamer-ti/gstreamer-ti.inc
@@ -15,7 +15,7 @@ require recipes-ti/includes/ti-paths.inc
15require recipes-ti/includes/ti-staging.inc 15require recipes-ti/includes/ti-staging.inc
16 16
17# Rebuild on kernel change since it links statically to ti-dmai, ti-codec-engine, etc 17# Rebuild on kernel change since it links statically to ti-dmai, ti-codec-engine, etc
18PR = "r84+${MACHINE_KERNEL_PR}" 18PR = "r85+${MACHINE_KERNEL_PR}"
19 19
20DEPENDS = "ti-dmai gstreamer gst-plugins-base" 20DEPENDS = "ti-dmai gstreamer gst-plugins-base"
21 21
@@ -52,6 +52,10 @@ XDC_PLATFORM_omapl137 = "ti.platforms.evmOMAPL137"
52XDC_PLATFORM_omapl138 = "ti.platforms.evmOMAPL138" 52XDC_PLATFORM_omapl138 = "ti.platforms.evmOMAPL138"
53XDC_PLATFORM ?= "UNDEFINED_XDC_PLATFORM" 53XDC_PLATFORM ?= "UNDEFINED_XDC_PLATFORM"
54 54
55MEMARGS_omap3 = "99M@0x80000000"
56MEMARGS ?= "UNDEFINED_MEM_ARGS"
57
58export MEMARGS
55export PLATFORM 59export PLATFORM
56export GST_TI_PLATFORM 60export GST_TI_PLATFORM
57export XDC_PLATFORM 61export XDC_PLATFORM
@@ -121,8 +125,11 @@ do_install_prepend () {
121 125
122 install -d ${D}${sysconfdir}/init.d/ 126 install -d ${D}${sysconfdir}/init.d/
123 install -m 0755 ${WORKDIR}/gstreamer-ti-rc.sh ${D}${sysconfdir}/init.d/gstti-init 127 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 128 sed -i -e 's|<platform>|${PLATFORM}|g' ${D}${sysconfdir}/init.d/gstti-init
129
130 install -d ${D}${base_libdir}/systemd/system
131 install -m 0644 ${WORKDIR}/gstti-init.service ${D}${base_libdir}/systemd/system/
132 sed -i -e 's|<platform>|${PLATFORM}|g' -e 's|MEMARGS|99M@0x80000000|' ${D}${base_libdir}/systemd/system/gstti-init.service
126} 133}
127 134
128RRECOMMENDS_${PN}_append_dm6446 += "ti-codecs-dm6446-server ti-cmem-module ti-dsplink-module" 135RRECOMMENDS_${PN}_append_dm6446 += "ti-codecs-dm6446-server ti-cmem-module ti-dsplink-module"
@@ -133,11 +140,19 @@ RRECOMMENDS_${PN}_append_dm365 += "ti-codecs-dm365 ti-cmem-module
133RRECOMMENDS_${PN}_append_omapl137 += "ti-codecs-omapl137-server ti-cmem-module ti-dsplink-module" 140RRECOMMENDS_${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" 141RRECOMMENDS_${PN}_append_omapl138 += "ti-codecs-omapl138-server ti-cmem-module ti-dsplink-module"
135 142
136FILES_${PN} += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir}" 143FILES_${PN} += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir} ${base_libdir}/systemd"
137FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la" 144FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la"
138FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" 145FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
139 146
140pkg_postinst_${PN} () { 147pkg_postinst_${PN} () {
148if test "x$D" != "x"; then
149 echo "Can't run gstreamer-ti postinst offline"
150 exit 1
151fi
152 if [ -e ${base_bindir}/systemctl ] ; then
153 systemctl enable gstti-init.service
154 fi
155
141 if [ -d ${installdir}/ti-codecs-server/ ]; then 156 if [ -d ${installdir}/ti-codecs-server/ ]; then
142 ln -sf ${installdir}/ti-codecs-server/* ${installdir}/gst/${PLATFORM}/ 157 ln -sf ${installdir}/ti-codecs-server/* ${installdir}/gst/${PLATFORM}/
143 fi 158 fi
diff --git a/recipes-ti/gstreamer-ti/gstreamer-ti/gstti-init.service b/recipes-ti/gstreamer-ti/gstreamer-ti/gstti-init.service
new file mode 100644
index 00000000..cccf5343
--- /dev/null
+++ b/recipes-ti/gstreamer-ti/gstreamer-ti/gstti-init.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=TI Gstreamer plugins init
3ConditionKernelCommandLine=mem=MEMARGS
4
5[Service]
6ExecStart=/usr/share/ti/gst/<platform>/loadmodules.sh
7RemainAfterExit=yes
8
9[Install]
10WantedBy=multi-user.target
diff --git a/recipes-ti/gstreamer-ti/gstreamer-ti_svn.bb b/recipes-ti/gstreamer-ti/gstreamer-ti_svn.bb
index 9284eab6..3d260ed5 100644
--- a/recipes-ti/gstreamer-ti/gstreamer-ti_svn.bb
+++ b/recipes-ti/gstreamer-ti/gstreamer-ti_svn.bb
@@ -12,8 +12,9 @@ SRCREV = "962"
12# https://gstreamer.ti.com/gf/project/gstreamer_ti/tracker/?action=TrackerItemEdit&tracker_item_id=1208&start=175 12# https://gstreamer.ti.com/gf/project/gstreamer_ti/tracker/?action=TrackerItemEdit&tracker_item_id=1208&start=175
13 13
14SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \ 14SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \
15file://gstreamer-ti-rc.sh \ 15 file://gstreamer-ti-rc.sh \
16file://r962-remove-include-videodev.diff \ 16 file://r962-remove-include-videodev.diff \
17 file://gstti-init.service \
17" 18"
18 19
19# use local loadmodules.sh for these platform 20# use local loadmodules.sh for these platform