README: refer to toolchain-layer in meta-openembedded
[glsdk/meta-ti-glsdk.git] / recipes-ti / gstreamer-ti / gstreamer-ti.inc
index 422d8c7e80f67f2dcc63d3c653f586838dbfe5ac..cb032666a5c9f5011912599b613b31d7baed9232 100644 (file)
@@ -15,7 +15,7 @@ require recipes-ti/includes/ti-paths.inc
 require recipes-ti/includes/ti-staging.inc
 
 # Rebuild on kernel change since it links statically to ti-dmai, ti-codec-engine, etc
-PR = "r84+${MACHINE_KERNEL_PR}"
+PR = "r85+${MACHINE_KERNEL_PR}"
 
 DEPENDS = "ti-dmai gstreamer gst-plugins-base"
 
@@ -41,7 +41,7 @@ PLATFORM_dm365         = "dm365"
 PLATFORM_omapl137      = "omapl137"
 PLATFORM_omapl138      = "omapl138"
 PLATFORM              ?= "UNDEFINED_PLATFORM"
-GST_TI_PLATFORM = ${PLATFORM}
+GST_TI_PLATFORM = "${PLATFORM}"
 
 XDC_PLATFORM_dm6446    = "ti.platforms.evmDM6446"
 XDC_PLATFORM_dm6467    = "ti.platforms.evmDM6467"
@@ -52,11 +52,15 @@ XDC_PLATFORM_omapl137  = "ti.platforms.evmOMAPL137"
 XDC_PLATFORM_omapl138  = "ti.platforms.evmOMAPL138"
 XDC_PLATFORM          ?= "UNDEFINED_XDC_PLATFORM"
 
+MEMARGS_omap3         = "99M@0x80000000"
+MEMARGS              ?= "UNDEFINED_MEM_ARGS"
+
+export MEMARGS
 export PLATFORM
 export GST_TI_PLATFORM
 export XDC_PLATFORM
 export XDC_TARGET      = "gnu.targets.arm.GCArmv5T"
-export PLATFORM_XDC    = ${XDC_PLATFORM}
+export PLATFORM_XDC    = "${XDC_PLATFORM}"
 export CSTOOL_DIR      = "${TOOLCHAIN_PATH}"
 export MVTOOL_DIR      = "${TOOLCHAIN_PATH}"
 export MVTOOL_PREFIX   = "${TARGET_PREFIX}"
@@ -121,8 +125,11 @@ do_install_prepend () {
 
     install -d ${D}${sysconfdir}/init.d/
     install -m 0755  ${WORKDIR}/gstreamer-ti-rc.sh ${D}${sysconfdir}/init.d/gstti-init
-
     sed -i -e 's|<platform>|${PLATFORM}|g' ${D}${sysconfdir}/init.d/gstti-init
+
+       install -d ${D}${base_libdir}/systemd/system
+       install -m 0644 ${WORKDIR}/gstti-init.service ${D}${base_libdir}/systemd/system/
+       sed -i -e 's|<platform>|${PLATFORM}|g' -e 's|MEMARGS|${MEMARGS}|' ${D}${base_libdir}/systemd/system/gstti-init.service
 }
 
 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
 RRECOMMENDS_${PN}_append_omapl137  += "ti-codecs-omapl137-server ti-cmem-module ti-dsplink-module"
 RRECOMMENDS_${PN}_append_omapl138  += "ti-codecs-omapl138-server ti-cmem-module ti-dsplink-module"
 
-FILES_${PN}     += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir}"
+FILES_${PN}     += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir} ${base_libdir}/systemd"
 FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la"
 FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug"
 
 pkg_postinst_${PN} () {
+if test "x$D" != "x"; then
+       echo "Can't run gstreamer-ti postinst offline"
+    exit 1
+fi
+       if [ -e ${base_bindir}/systemctl ] ; then
+               systemctl enable gstti-init.service
+       fi
+
        if [ -d ${installdir}/ti-codecs-server/ ]; then
         ln -sf ${installdir}/ti-codecs-server/* ${installdir}/gst/${PLATFORM}/
        fi
@@ -147,4 +162,3 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 INITSCRIPT_NAME = "gstti-init"
 INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
-