diff options
author | Sam Nelson <sam.nelson@ti.com> | 2018-09-11 03:10:53 +0000 |
---|---|---|
committer | Denys Dmytriyenko <denys@ti.com> | 2018-09-11 01:10:55 +0000 |
commit | ac6d0da46a715e37b8fce3791613db8ca18f0340 (patch) | |
tree | 0c6879cc2d110b397736abef7de35056daa0cfd4 /recipes-ti | |
parent | 0c87b70e7c1007ef659481fa5e8fd5debc112ba0 (diff) | |
download | meta-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.service | 9 | ||||
-rw-r--r-- | recipes-ti/ipc/ti-ipc_git.bb | 21 |
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] | ||
2 | Description=TI IPC Daemon | ||
3 | |||
4 | [Service] | ||
5 | Type=forking | ||
6 | ExecStart=/usr/bin/__LAD_DAEMON__ -g -l lad.txt | ||
7 | |||
8 | [Install] | ||
9 | WantedBy=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" | |||
4 | require ti-ipc.inc | 4 | require ti-ipc.inc |
5 | require ti-ipc-common.inc | 5 | require ti-ipc-common.inc |
6 | 6 | ||
7 | PR = "${INC_PR}.1" | 7 | PR = "${INC_PR}.2" |
8 | 8 | ||
9 | DEPENDS += "virtual/kernel" | 9 | DEPENDS += "virtual/kernel" |
10 | 10 | ||
11 | SRC_URI += "file://tiipclad-daemon.sh \ | 11 | SRC_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" | |||
23 | DAEMON_omapl138 = "lad_omapl138" | 24 | DAEMON_omapl138 = "lad_omapl138" |
24 | DAEMON_k3 = "lad_am65xx" | 25 | DAEMON_k3 = "lad_am65xx" |
25 | 26 | ||
26 | inherit autotools-brokensep pkgconfig update-rc.d | 27 | inherit autotools-brokensep pkgconfig update-rc.d systemd |
27 | 28 | ||
28 | INITSCRIPT_NAME = "tiipclad-daemon.sh" | 29 | INITSCRIPT_NAME = "tiipclad-daemon.sh" |
29 | INITSCRIPT_PARAMS = "defaults 10" | 30 | INITSCRIPT_PARAMS = "defaults 10" |
30 | 31 | ||
32 | SYSTEMD_SERVICE_${PN} = "tiipclad-daemon.service" | ||
33 | |||
31 | EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${STAGING_KERNEL_BUILDDIR}" | 34 | EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${STAGING_KERNEL_BUILDDIR}" |
32 | 35 | ||
33 | do_compile[depends] += "virtual/kernel:do_shared_workdir" | 36 | do_compile[depends] += "virtual/kernel:do_shared_workdir" |
@@ -40,10 +43,20 @@ do_configure() { | |||
40 | do_install_append() { | 43 | do_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 | ||
49 | do_install_append_dra7xx() { | 62 | do_install_append_dra7xx() { |