diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2011-09-02 12:09:28 +0200 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-09-02 12:12:40 +0200 |
commit | d37b88a40d8fc712b1e1578c9865e22438fb9ed5 (patch) | |
tree | 404c4c2bcf7a3a4fa83f570dced958e0e9aab402 | |
parent | 34d96f765c4fb043d1c6ca744c88aadb884b9be1 (diff) | |
download | meta-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>
-rw-r--r-- | recipes-ti/gstreamer-ti/gstreamer-ti.inc | 21 | ||||
-rw-r--r-- | recipes-ti/gstreamer-ti/gstreamer-ti/gstti-init.service | 10 | ||||
-rw-r--r-- | recipes-ti/gstreamer-ti/gstreamer-ti_svn.bb | 5 |
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 | |||
15 | require recipes-ti/includes/ti-staging.inc | 15 | require 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 |
18 | PR = "r84+${MACHINE_KERNEL_PR}" | 18 | PR = "r85+${MACHINE_KERNEL_PR}" |
19 | 19 | ||
20 | DEPENDS = "ti-dmai gstreamer gst-plugins-base" | 20 | DEPENDS = "ti-dmai gstreamer gst-plugins-base" |
21 | 21 | ||
@@ -52,6 +52,10 @@ XDC_PLATFORM_omapl137 = "ti.platforms.evmOMAPL137" | |||
52 | XDC_PLATFORM_omapl138 = "ti.platforms.evmOMAPL138" | 52 | XDC_PLATFORM_omapl138 = "ti.platforms.evmOMAPL138" |
53 | XDC_PLATFORM ?= "UNDEFINED_XDC_PLATFORM" | 53 | XDC_PLATFORM ?= "UNDEFINED_XDC_PLATFORM" |
54 | 54 | ||
55 | MEMARGS_omap3 = "99M@0x80000000" | ||
56 | MEMARGS ?= "UNDEFINED_MEM_ARGS" | ||
57 | |||
58 | export MEMARGS | ||
55 | export PLATFORM | 59 | export PLATFORM |
56 | export GST_TI_PLATFORM | 60 | export GST_TI_PLATFORM |
57 | export XDC_PLATFORM | 61 | export 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 | ||
128 | RRECOMMENDS_${PN}_append_dm6446 += "ti-codecs-dm6446-server ti-cmem-module ti-dsplink-module" | 135 | RRECOMMENDS_${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 | |||
133 | RRECOMMENDS_${PN}_append_omapl137 += "ti-codecs-omapl137-server ti-cmem-module ti-dsplink-module" | 140 | RRECOMMENDS_${PN}_append_omapl137 += "ti-codecs-omapl137-server ti-cmem-module ti-dsplink-module" |
134 | RRECOMMENDS_${PN}_append_omapl138 += "ti-codecs-omapl138-server ti-cmem-module ti-dsplink-module" | 141 | RRECOMMENDS_${PN}_append_omapl138 += "ti-codecs-omapl138-server ti-cmem-module ti-dsplink-module" |
135 | 142 | ||
136 | FILES_${PN} += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir}" | 143 | FILES_${PN} += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir} ${base_libdir}/systemd" |
137 | FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la" | 144 | FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la" |
138 | FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" | 145 | FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" |
139 | 146 | ||
140 | pkg_postinst_${PN} () { | 147 | pkg_postinst_${PN} () { |
148 | if test "x$D" != "x"; then | ||
149 | echo "Can't run gstreamer-ti postinst offline" | ||
150 | exit 1 | ||
151 | fi | ||
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] | ||
2 | Description=TI Gstreamer plugins init | ||
3 | ConditionKernelCommandLine=mem=MEMARGS | ||
4 | |||
5 | [Service] | ||
6 | ExecStart=/usr/share/ti/gst/<platform>/loadmodules.sh | ||
7 | RemainAfterExit=yes | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=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 | ||
14 | SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \ | 14 | SRC_URI = "svn://gforge.ti.com/svn/gstreamer_ti/trunk;module=gstreamer_ti;proto=https;user=anonymous;pswd='' \ |
15 | file://gstreamer-ti-rc.sh \ | 15 | file://gstreamer-ti-rc.sh \ |
16 | file://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 |