* [rocko-next][PATCH v2] ti-ipc: Add systemd startup script
@ 2018-09-10 21:10 Sam Nelson
2018-09-11 1:15 ` Denys Dmytriyenko
0 siblings, 1 reply; 3+ messages in thread
From: Sam Nelson @ 2018-09-10 21:10 UTC (permalink / raw)
To: meta-ti
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>
---
Changes from previous version of patch
Remove PIDFile entries
---
---
recipes-ti/ipc/ti-ipc/tiipclad-daemon.service | 9 +++++++++
recipes-ti/ipc/ti-ipc_git.bb | 21 +++++++++++++++++----
2 files changed, 26 insertions(+), 4 deletions(-)
create mode 100644 recipes-ti/ipc/ti-ipc/tiipclad-daemon.service
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 0000000..ea26845
--- /dev/null
+++ b/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=TI IPC Daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/__LAD_DAEMON__ -g -l lad.txt
+
+[Install]
+WantedBy=basic.target
diff --git a/recipes-ti/ipc/ti-ipc_git.bb b/recipes-ti/ipc/ti-ipc_git.bb
index 23b8d94..8b3ac91 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"
require ti-ipc.inc
require ti-ipc-common.inc
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
DEPENDS += "virtual/kernel"
SRC_URI += "file://tiipclad-daemon.sh \
file://omap_remoteproc.conf \
+ file://tiipclad-daemon.service \
file://0001-Add-kernel-build-dir.patch \
"
@@ -23,11 +24,13 @@ DAEMON_k2g = "lad_66ak2g"
DAEMON_omapl138 = "lad_omapl138"
DAEMON_k3 = "lad_am65xx"
-inherit autotools-brokensep pkgconfig update-rc.d
+inherit autotools-brokensep pkgconfig update-rc.d systemd
INITSCRIPT_NAME = "tiipclad-daemon.sh"
INITSCRIPT_PARAMS = "defaults 10"
+SYSTEMD_SERVICE_${PN} = "tiipclad-daemon.service"
+
EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${STAGING_KERNEL_BUILDDIR}"
do_compile[depends] += "virtual/kernel:do_shared_workdir"
@@ -40,10 +43,20 @@ do_configure() {
do_install_append() {
install -d ${D}${sysconfdir}/init.d/
- # Modify the tiipclad-daemon.sh script to point to the right
+ # Modify the startup scripts to point to the right
# lad daemon executable.
sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.sh
- install -c -m 755 ${WORKDIR}/tiipclad-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
+ sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.service
+
+ 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}/tiipclad-daemon.service ${D}${systemd_system_unitdir}
+ else
+ install -d ${D}${sysconfdir}/init.d/
+ install -c -m 755 ${S}/scripts/tiipclad-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
+ fi
}
do_install_append_dra7xx() {
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [rocko-next][PATCH v2] ti-ipc: Add systemd startup script
2018-09-10 21:10 [rocko-next][PATCH v2] ti-ipc: Add systemd startup script Sam Nelson
@ 2018-09-11 1:15 ` Denys Dmytriyenko
2018-09-12 13:27 ` [EXTERNAL] " Jacob Stiffler
0 siblings, 1 reply; 3+ messages in thread
From: Denys Dmytriyenko @ 2018-09-11 1:15 UTC (permalink / raw)
To: Sam Nelson; +Cc: meta-ti
Thanks.
BTW, rocko-next is not a correct destination release/LTS for a patch.
On Mon, Sep 10, 2018 at 05:10:53PM -0400, Sam Nelson wrote:
> 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>
>
> ---
> Changes from previous version of patch
> Remove PIDFile entries
> ---
> ---
> recipes-ti/ipc/ti-ipc/tiipclad-daemon.service | 9 +++++++++
> recipes-ti/ipc/ti-ipc_git.bb | 21 +++++++++++++++++----
> 2 files changed, 26 insertions(+), 4 deletions(-)
> create mode 100644 recipes-ti/ipc/ti-ipc/tiipclad-daemon.service
>
> 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 0000000..ea26845
> --- /dev/null
> +++ b/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service
> @@ -0,0 +1,9 @@
> +[Unit]
> +Description=TI IPC Daemon
> +
> +[Service]
> +Type=forking
> +ExecStart=/usr/bin/__LAD_DAEMON__ -g -l lad.txt
> +
> +[Install]
> +WantedBy=basic.target
> diff --git a/recipes-ti/ipc/ti-ipc_git.bb b/recipes-ti/ipc/ti-ipc_git.bb
> index 23b8d94..8b3ac91 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"
> require ti-ipc.inc
> require ti-ipc-common.inc
>
> -PR = "${INC_PR}.1"
> +PR = "${INC_PR}.2"
>
> DEPENDS += "virtual/kernel"
>
> SRC_URI += "file://tiipclad-daemon.sh \
> file://omap_remoteproc.conf \
> + file://tiipclad-daemon.service \
> file://0001-Add-kernel-build-dir.patch \
> "
>
> @@ -23,11 +24,13 @@ DAEMON_k2g = "lad_66ak2g"
> DAEMON_omapl138 = "lad_omapl138"
> DAEMON_k3 = "lad_am65xx"
>
> -inherit autotools-brokensep pkgconfig update-rc.d
> +inherit autotools-brokensep pkgconfig update-rc.d systemd
>
> INITSCRIPT_NAME = "tiipclad-daemon.sh"
> INITSCRIPT_PARAMS = "defaults 10"
>
> +SYSTEMD_SERVICE_${PN} = "tiipclad-daemon.service"
> +
> EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${STAGING_KERNEL_BUILDDIR}"
>
> do_compile[depends] += "virtual/kernel:do_shared_workdir"
> @@ -40,10 +43,20 @@ do_configure() {
> do_install_append() {
> install -d ${D}${sysconfdir}/init.d/
>
> - # Modify the tiipclad-daemon.sh script to point to the right
> + # Modify the startup scripts to point to the right
> # lad daemon executable.
> sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.sh
> - install -c -m 755 ${WORKDIR}/tiipclad-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
> + sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.service
> +
> + 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}/tiipclad-daemon.service ${D}${systemd_system_unitdir}
> + else
> + install -d ${D}${sysconfdir}/init.d/
> + install -c -m 755 ${S}/scripts/tiipclad-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
> + fi
> }
>
> do_install_append_dra7xx() {
> --
> 1.9.1
>
> --
> _______________________________________________
> meta-ti mailing list
> meta-ti@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-ti
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [EXTERNAL] Re: [rocko-next][PATCH v2] ti-ipc: Add systemd startup script
2018-09-11 1:15 ` Denys Dmytriyenko
@ 2018-09-12 13:27 ` Jacob Stiffler
0 siblings, 0 replies; 3+ messages in thread
From: Jacob Stiffler @ 2018-09-12 13:27 UTC (permalink / raw)
To: Denys Dmytriyenko, Sam Nelson; +Cc: meta-ti
Denys,
Can you please backport this to ti2018.03?
Thank you,
Jake
On 9/10/2018 9:15 PM, Denys Dmytriyenko wrote:
> Thanks.
>
> BTW, rocko-next is not a correct destination release/LTS for a patch.
>
>
> On Mon, Sep 10, 2018 at 05:10:53PM -0400, Sam Nelson wrote:
>> 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>
>>
>> ---
>> Changes from previous version of patch
>> Remove PIDFile entries
>> ---
>> ---
>> recipes-ti/ipc/ti-ipc/tiipclad-daemon.service | 9 +++++++++
>> recipes-ti/ipc/ti-ipc_git.bb | 21 +++++++++++++++++----
>> 2 files changed, 26 insertions(+), 4 deletions(-)
>> create mode 100644 recipes-ti/ipc/ti-ipc/tiipclad-daemon.service
>>
>> 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 0000000..ea26845
>> --- /dev/null
>> +++ b/recipes-ti/ipc/ti-ipc/tiipclad-daemon.service
>> @@ -0,0 +1,9 @@
>> +[Unit]
>> +Description=TI IPC Daemon
>> +
>> +[Service]
>> +Type=forking
>> +ExecStart=/usr/bin/__LAD_DAEMON__ -g -l lad.txt
>> +
>> +[Install]
>> +WantedBy=basic.target
>> diff --git a/recipes-ti/ipc/ti-ipc_git.bb b/recipes-ti/ipc/ti-ipc_git.bb
>> index 23b8d94..8b3ac91 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"
>> require ti-ipc.inc
>> require ti-ipc-common.inc
>>
>> -PR = "${INC_PR}.1"
>> +PR = "${INC_PR}.2"
>>
>> DEPENDS += "virtual/kernel"
>>
>> SRC_URI += "file://tiipclad-daemon.sh \
>> file://omap_remoteproc.conf \
>> + file://tiipclad-daemon.service \
>> file://0001-Add-kernel-build-dir.patch \
>> "
>>
>> @@ -23,11 +24,13 @@ DAEMON_k2g = "lad_66ak2g"
>> DAEMON_omapl138 = "lad_omapl138"
>> DAEMON_k3 = "lad_am65xx"
>>
>> -inherit autotools-brokensep pkgconfig update-rc.d
>> +inherit autotools-brokensep pkgconfig update-rc.d systemd
>>
>> INITSCRIPT_NAME = "tiipclad-daemon.sh"
>> INITSCRIPT_PARAMS = "defaults 10"
>>
>> +SYSTEMD_SERVICE_${PN} = "tiipclad-daemon.service"
>> +
>> EXTRA_OECONF += "PLATFORM=${PLATFORM} KERNEL_INSTALL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${STAGING_KERNEL_BUILDDIR}"
>>
>> do_compile[depends] += "virtual/kernel:do_shared_workdir"
>> @@ -40,10 +43,20 @@ do_configure() {
>> do_install_append() {
>> install -d ${D}${sysconfdir}/init.d/
>>
>> - # Modify the tiipclad-daemon.sh script to point to the right
>> + # Modify the startup scripts to point to the right
>> # lad daemon executable.
>> sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.sh
>> - install -c -m 755 ${WORKDIR}/tiipclad-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
>> + sed -i -e "s/__LAD_DAEMON__/${DAEMON}/" ${WORKDIR}/tiipclad-daemon.service
>> +
>> + 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}/tiipclad-daemon.service ${D}${systemd_system_unitdir}
>> + else
>> + install -d ${D}${sysconfdir}/init.d/
>> + install -c -m 755 ${S}/scripts/tiipclad-daemon.sh ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
>> + fi
>> }
>>
>> do_install_append_dra7xx() {
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> meta-ti mailing list
>> meta-ti@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-ti
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-12 13:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-10 21:10 [rocko-next][PATCH v2] ti-ipc: Add systemd startup script Sam Nelson
2018-09-11 1:15 ` Denys Dmytriyenko
2018-09-12 13:27 ` [EXTERNAL] " Jacob Stiffler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.