aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-ti/multiprocmgr/multiprocmgr_git.bb
blob: cafcd980d97cccb445aac4be81cb60cdbc3bcc2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
DESCRIPTION = "TI Multiproc Manager for KeyStone II"
SUMMARY = "Provides download, debug and other utilities for other cores in the SOC like DSP"

include multiprocmgr.inc

SRC_URI_append = " file://mpmsrv-daemon.service"

PR = "${INC_PR}.1"

DEPENDS = "mpm-transport libdaemon virtual/kernel cmem"
RDEPENDS_${PN} = "syslog-ng"

PACKAGE_ARCH = "${MACHINE_ARCH}"

CC += "-I${STAGING_KERNEL_DIR}/include"

INITSCRIPT_NAME = "mpmsrv-daemon.sh"
INITSCRIPT_PARAMS = "defaults 10"

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

	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

	install -d ${D}${includedir}/
	install -c -m 755 ${S}/include/* ${D}${includedir}/

	install -d ${D}${libdir}/
	cp -a ${S}/lib/* ${D}${libdir}/
}