summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3-adas/recipes-multimedia/mm-init
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-12-19 15:07:39 -0500
committerTom Rini <trini@konsulko.com>2017-12-19 15:07:39 -0500
commit9ae3b81724f87dcc1f5cbd618c472e0cf79b2791 (patch)
treed3d1e6ac479ba64a78dcf16e521898a44ed08878 /meta-rcar-gen3-adas/recipes-multimedia/mm-init
parent592c4aca65cc41ea9e5757084ae1d488d2bbd8b0 (diff)
parenteb675727a6bfdee2ba7dd36644403163f9d905e2 (diff)
Merge branch 'pyro' into eel
Diffstat (limited to 'meta-rcar-gen3-adas/recipes-multimedia/mm-init')
-rw-r--r--meta-rcar-gen3-adas/recipes-multimedia/mm-init/mm-init.bb16
-rw-r--r--meta-rcar-gen3-adas/recipes-multimedia/mm-init/mm-init/init28
2 files changed, 44 insertions, 0 deletions
diff --git a/meta-rcar-gen3-adas/recipes-multimedia/mm-init/mm-init.bb b/meta-rcar-gen3-adas/recipes-multimedia/mm-init/mm-init.bb
new file mode 100644
index 0000000..3781a76
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-multimedia/mm-init/mm-init.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Startup script for Renesas MM modules"
+LICENSE = "CLOSED"
+
+SRC_URI = "file://init"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}/${sysconfdir}/init.d
+ install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/rc.mm
+}
+
+inherit allarch update-rc.d
+
+INITSCRIPT_NAME = "rc.mm"
+INITSCRIPT_PARAMS = "start 8 5 2 . stop 21 0 1 6 ."
diff --git a/meta-rcar-gen3-adas/recipes-multimedia/mm-init/mm-init/init b/meta-rcar-gen3-adas/recipes-multimedia/mm-init/mm-init/init
new file mode 100644
index 0000000..b6c9985
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-multimedia/mm-init/mm-init/init
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+### BEGIN INIT INFO
+# Provides: mm
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 5
+# Default-Stop: 0 1 6
+### END INIT INFO
+
+case "$1" in
+"start")
+ # insert multimedia modules
+ /sbin/modprobe -q -a mmngr mmngrbuf vspm vspm_if uvcs_drv
+ ;;
+stop)
+ # remove multimedia modules
+ /sbin/modprobe -q -r -a mmngr mmngrbuf vspm vspm_if uvcs_drv
+ ;;
+reload|restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+*)
+ echo "usage: $0 { start | stop | restart }"
+ ;;
+esac