mirror of
https://git.yoctoproject.org/meta-ti
synced 2026-06-05 02:11:00 +00:00
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>
This commit is contained in:
committed by
Denys Dmytriyenko
parent
6951735397
commit
882eb9e799
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=TI Multiproc Manager
|
||||
|
||||
[Service]
|
||||
ExecStartPre=/sbin/modprobe keystone_remoteproc
|
||||
ExecStartPre=/sbin/modprobe keystone_dsp_mem
|
||||
ExecStartPre=/sbin/modprobe uio_module_drv
|
||||
|
||||
Type=forking
|
||||
PIDFile=/var/run/mpm/pid
|
||||
ExecStart=/usr/bin/mpmsrv
|
||||
|
||||
[Install]
|
||||
WantedBy=basic.target
|
||||
@@ -3,7 +3,9 @@ SUMMARY = "Provides download, debug and other utilities for other cores in the S
|
||||
|
||||
include multiprocmgr.inc
|
||||
|
||||
PR = "${INC_PR}.0"
|
||||
SRC_URI_append = " file://mpmsrv-daemon.service"
|
||||
|
||||
PR = "${INC_PR}.1"
|
||||
|
||||
DEPENDS = "mpm-transport libdaemon virtual/kernel"
|
||||
RDEPENDS_${PN} = "syslog-ng"
|
||||
@@ -15,15 +17,24 @@ CC += "-I${STAGING_KERNEL_DIR}/include"
|
||||
INITSCRIPT_NAME = "mpmsrv-daemon.sh"
|
||||
INITSCRIPT_PARAMS = "defaults 10"
|
||||
|
||||
inherit update-rc.d
|
||||
SYSTEMD_SERVICE_${PN} = "mpmsrv-daemon.service"
|
||||
|
||||
inherit update-rc.d systemd
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${bindir}/
|
||||
install -c -m 755 ${S}/bin/mpmsrv ${D}${bindir}/mpmsrv
|
||||
install -c -m 755 ${S}/bin/mpmcl ${D}${bindir}/mpmcl
|
||||
|
||||
install -d ${D}${sysconfdir}/init.d/
|
||||
install -c -m 755 ${S}/scripts/mpmsrv-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
|
||||
systemd_enabled=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '1', '0', d)}
|
||||
if [ ${systemd_enabled} -eq 1 ]
|
||||
then
|
||||
install -d ${D}${systemd_system_unitdir}
|
||||
install -m 0644 ${WORKDIR}/mpmsrv-daemon.service ${D}${systemd_system_unitdir}
|
||||
else
|
||||
install -d ${D}${sysconfdir}/init.d/
|
||||
install -c -m 755 ${S}/scripts/mpmsrv-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
|
||||
fi
|
||||
install -d ${D}${sysconfdir}/mpm/
|
||||
install -c -m 755 ${S}/scripts/crash_callback.sh ${D}${sysconfdir}/mpm/crash_callback.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user