summaryrefslogtreecommitdiffstats
path: root/recipes-ti/multiprocmgr
diff options
context:
space:
mode:
authorJacob Stiffler <j-stiffler@ti.com>2016-10-10 20:55:36 +0000
committerDenys Dmytriyenko <denys@ti.com>2016-10-24 22:28:57 -0400
commit882eb9e79960cb6a4d659ac98709e01d0bebd8d9 (patch)
treed52d9f5b7ec3fa19633c35575243b8b8a375c2a7 /recipes-ti/multiprocmgr
parent69517353970fd79659a45bd9a903fa4627038dd4 (diff)
downloadmeta-ti-882eb9e79960cb6a4d659ac98709e01d0bebd8d9.tar.gz
multiprocmgr: add systemd service
* The multiprocmgr's mpmsrv daemon requires a set of kernel modules to be loaded prior to initialization. * Add a systemd service so that these dependencies may be specified. Signed-off-by: Jacob Stiffler <j-stiffler@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-ti/multiprocmgr')
-rw-r--r--recipes-ti/multiprocmgr/multiprocmgr/mpmsrv-daemon.service14
-rw-r--r--recipes-ti/multiprocmgr/multiprocmgr_git.bb19
2 files changed, 29 insertions, 4 deletions
diff --git a/recipes-ti/multiprocmgr/multiprocmgr/mpmsrv-daemon.service b/recipes-ti/multiprocmgr/multiprocmgr/mpmsrv-daemon.service
new file mode 100644
index 00000000..40eb4650
--- /dev/null
+++ b/recipes-ti/multiprocmgr/multiprocmgr/mpmsrv-daemon.service
@@ -0,0 +1,14 @@
1[Unit]
2Description=TI Multiproc Manager
3
4[Service]
5ExecStartPre=/sbin/modprobe keystone_remoteproc
6ExecStartPre=/sbin/modprobe keystone_dsp_mem
7ExecStartPre=/sbin/modprobe uio_module_drv
8
9Type=forking
10PIDFile=/var/run/mpm/pid
11ExecStart=/usr/bin/mpmsrv
12
13[Install]
14WantedBy=basic.target
diff --git a/recipes-ti/multiprocmgr/multiprocmgr_git.bb b/recipes-ti/multiprocmgr/multiprocmgr_git.bb
index 38d4cebb..2960ee35 100644
--- a/recipes-ti/multiprocmgr/multiprocmgr_git.bb
+++ b/recipes-ti/multiprocmgr/multiprocmgr_git.bb
@@ -3,7 +3,9 @@ SUMMARY = "Provides download, debug and other utilities for other cores in the S
3 3
4include multiprocmgr.inc 4include multiprocmgr.inc
5 5
6PR = "${INC_PR}.0" 6SRC_URI_append = " file://mpmsrv-daemon.service"
7
8PR = "${INC_PR}.1"
7 9
8DEPENDS = "mpm-transport libdaemon virtual/kernel" 10DEPENDS = "mpm-transport libdaemon virtual/kernel"
9RDEPENDS_${PN} = "syslog-ng" 11RDEPENDS_${PN} = "syslog-ng"
@@ -15,15 +17,24 @@ CC += "-I${STAGING_KERNEL_DIR}/include"
15INITSCRIPT_NAME = "mpmsrv-daemon.sh" 17INITSCRIPT_NAME = "mpmsrv-daemon.sh"
16INITSCRIPT_PARAMS = "defaults 10" 18INITSCRIPT_PARAMS = "defaults 10"
17 19
18inherit update-rc.d 20SYSTEMD_SERVICE_${PN} = "mpmsrv-daemon.service"
21
22inherit update-rc.d systemd
19 23
20do_install() { 24do_install() {
21 install -d ${D}${bindir}/ 25 install -d ${D}${bindir}/
22 install -c -m 755 ${S}/bin/mpmsrv ${D}${bindir}/mpmsrv 26 install -c -m 755 ${S}/bin/mpmsrv ${D}${bindir}/mpmsrv
23 install -c -m 755 ${S}/bin/mpmcl ${D}${bindir}/mpmcl 27 install -c -m 755 ${S}/bin/mpmcl ${D}${bindir}/mpmcl
24 28
25 install -d ${D}${sysconfdir}/init.d/ 29 systemd_enabled=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '1', '0', d)}
26 install -c -m 755 ${S}/scripts/mpmsrv-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} 30 if [ ${systemd_enabled} -eq 1 ]
31 then
32 install -d ${D}${systemd_system_unitdir}
33 install -m 0644 ${WORKDIR}/mpmsrv-daemon.service ${D}${systemd_system_unitdir}
34 else
35 install -d ${D}${sysconfdir}/init.d/
36 install -c -m 755 ${S}/scripts/mpmsrv-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
37 fi
27 install -d ${D}${sysconfdir}/mpm/ 38 install -d ${D}${sysconfdir}/mpm/
28 install -c -m 755 ${S}/scripts/crash_callback.sh ${D}${sysconfdir}/mpm/crash_callback.sh 39 install -c -m 755 ${S}/scripts/crash_callback.sh ${D}${sysconfdir}/mpm/crash_callback.sh
29 40