summaryrefslogtreecommitdiffstats
path: root/recipes-ti
diff options
context:
space:
mode:
authorSam Nelson <sam.nelson@ti.com>2018-09-11 03:10:53 +0000
committerDenys Dmytriyenko <denys@ti.com>2018-09-11 01:10:55 +0000
commitac6d0da46a715e37b8fce3791613db8ca18f0340 (patch)
tree0c6879cc2d110b397736abef7de35056daa0cfd4 /recipes-ti
parent0c87b70e7c1007ef659481fa5e8fd5debc112ba0 (diff)
downloadmeta-ti-ac6d0da46a715e37b8fce3791613db8ca18f0340.tar.gz
ti-ipc: Add systemd startup script
With systemd enabled, it is better to add the proper systemd script instead of legacy init.d script. Signed-off-by: Sam Nelson <sam.nelson@ti.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes-ti')
-rw-r--r--recipes-ti/ipc/ti-ipc/tiipclad-daemon.service9
-rw-r--r--recipes-ti/ipc/ti-ipc_git.bb21
2 files changed, 26 insertions, 4 deletions
diff --git a/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service b/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service
new file mode 100644
index 00000000..ea26845e
--- /dev/null
+++ b/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service
@@ -0,0 +1,9 @@
1[Unit]
2Description=TI IPC Daemon
3
4[Service]
5Type=forking
6ExecStart=/usr/bin/__LAD_DAEMON__ -g -l lad.txt
7
8[Install]
9WantedBy=basic.target
diff --git a/recipes-ti/ipc/ti-ipc_git.bb b/recipes-ti/ipc/ti-ipc_git.bb
index 23b8d946..8b3ac91d 100644
--- a/recipes-ti/ipc/ti-ipc_git.bb
+++ b/recipes-ti/ipc/ti-ipc_git.bb
@@ -4,12 +4,13 @@ HOMEPAGE="http://processors.wiki.ti.com/index.php/Category:IPC"
4require ti-ipc.inc 4require ti-ipc.inc
5require ti-ipc-common.inc 5require ti-ipc-common.inc
6 6
7PR = "${INC_PR}.1" 7PR = "${INC_PR}.2"
8 8
9DEPENDS += "virtual/kernel" 9DEPENDS += "virtual/kernel"
10 10
11SRC_URI += "file://tiipclad-daemon.sh \ 11SRC_URI += "file://tiipclad-daemon.sh \
12 file://omap_remoteproc.conf \ 12 file://omap_remoteproc.conf \
13 file://tiipclad-daemon.service \
13 file://0001-Add-kernel-build-dir.patch \ 14 file://0001-Add-kernel-build-dir.patch \
14 " 15 "
15 16
@@ -23,11 +24,13 @@ DAEMON_k2g = "lad_66ak2g"
23DAEMON_omapl138 = "lad_omapl138" 24DAEMON_omapl138 = "lad_omapl138"
24DAEMON_k3 = "lad_am65xx" 25DAEMON_k3 = "lad_am65xx"
25 26
26inherit autotools-brokensep pkgconfig update-rc.d 27inherit autotools-brokensep pkgconfig update-rc.d systemd
27 28
28INITSCRIPT_NAME = "tiipclad-daemon.sh" 29INITSCRIPT_NAME = "tiipclad-daemon.sh"
29INITSCRIPT_PARAMS = "defaults 10" 30INITSCRIPT_PARAMS = "defaults 10"
30 31
32SYSTEMD_SERVICE_${PN} = "tiipclad-daemon.service"
33
31EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${STAGING_KERNEL_BUILDDIR}" 34EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${STAGING_KERNEL_BUILDDIR}"
32 35
33do_compile[depends] += "virtual/kernel:do_shared_workdir" 36do_compile[depends] += "virtual/kernel:do_shared_workdir"
@@ -40,10 +43,20 @@ do_configure() {
40do_install_append() { 43do_install_append() {
41 install -d ${D}${sysconfdir}/init.d/ 44 install -d ${D}${sysconfdir}/init.d/
42 45
43 # Modify the tiipclad-daemon.sh script to point to the right 46 # Modify the startup scripts to point to the right
44 # lad daemon executable. 47 # lad daemon executable.
45 sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.sh 48 sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.sh
46 install -c -m 755 ${WORKDIR}/tiipclad-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME} 49 sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.service
50
51 systemd_enabled=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '1', '0', d)}
52 if [ ${systemd_enabled} -eq 1 ]
53 then
54 install -d ${D}${systemd_system_unitdir}
55 install -m 0644 ${WORKDIR}/tiipclad-daemon.service ${D}${systemd_system_unitdir}
56 else
57 install -d ${D}${sysconfdir}/init.d/
58 install -c -m 755 ${S}/scripts/tiipclad-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
59 fi
47} 60}
48 61
49do_install_append_dra7xx() { 62do_install_append_dra7xx() {