diff options
author | Jacob Stiffler <j-stiffler@ti.com> | 2016-10-10 20:55:36 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2016-10-24 22:28:57 -0400 |
commit | 882eb9e79960cb6a4d659ac98709e01d0bebd8d9 (patch) | |
tree | d52d9f5b7ec3fa19633c35575243b8b8a375c2a7 | |
parent | 69517353970fd79659a45bd9a903fa4627038dd4 (diff) | |
download | meta-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>
-rw-r--r-- | recipes-ti/multiprocmgr/multiprocmgr/mpmsrv-daemon.service | 14 | ||||
-rw-r--r-- | recipes-ti/multiprocmgr/multiprocmgr_git.bb | 19 |
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] | ||
2 | Description=TI Multiproc Manager | ||
3 | |||
4 | [Service] | ||
5 | ExecStartPre=/sbin/modprobe keystone_remoteproc | ||
6 | ExecStartPre=/sbin/modprobe keystone_dsp_mem | ||
7 | ExecStartPre=/sbin/modprobe uio_module_drv | ||
8 | |||
9 | Type=forking | ||
10 | PIDFile=/var/run/mpm/pid | ||
11 | ExecStart=/usr/bin/mpmsrv | ||
12 | |||
13 | [Install] | ||
14 | WantedBy=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 | ||
4 | include multiprocmgr.inc | 4 | include multiprocmgr.inc |
5 | 5 | ||
6 | PR = "${INC_PR}.0" | 6 | SRC_URI_append = " file://mpmsrv-daemon.service" |
7 | |||
8 | PR = "${INC_PR}.1" | ||
7 | 9 | ||
8 | DEPENDS = "mpm-transport libdaemon virtual/kernel" | 10 | DEPENDS = "mpm-transport libdaemon virtual/kernel" |
9 | RDEPENDS_${PN} = "syslog-ng" | 11 | RDEPENDS_${PN} = "syslog-ng" |
@@ -15,15 +17,24 @@ CC += "-I${STAGING_KERNEL_DIR}/include" | |||
15 | INITSCRIPT_NAME = "mpmsrv-daemon.sh" | 17 | INITSCRIPT_NAME = "mpmsrv-daemon.sh" |
16 | INITSCRIPT_PARAMS = "defaults 10" | 18 | INITSCRIPT_PARAMS = "defaults 10" |
17 | 19 | ||
18 | inherit update-rc.d | 20 | SYSTEMD_SERVICE_${PN} = "mpmsrv-daemon.service" |
21 | |||
22 | inherit update-rc.d systemd | ||
19 | 23 | ||
20 | do_install() { | 24 | do_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 | ||