From: Changqing Li <changqing...@windriver.com>

On slow system, dlt service may fail since watchdog timeout, backport a
patch to make DLT_WatchdogSec configurable, so that this service can
start successfully during boot.

(cherry-picked from 1cf77003036049533fbda22b96c7fbad1cc693f9)

Signed-off-by: Changqing Li <changqing...@windriver.com>
Signed-off-by: Khem Raj <raj.k...@gmail.com>
---
 ...e-DLT_WatchdogSec-can-be-set-by-user.patch | 40 +++++++++++++++++++
 .../dlt-daemon/dlt-daemon_2.18.10.bb          |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 
meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch

diff --git 
a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch
 
b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch
new file mode 100644
index 0000000000..335872c40f
--- /dev/null
+++ 
b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon/0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch
@@ -0,0 +1,40 @@
+From bc03f142507da92add8ba325fdf8187d47a7d719 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing...@windriver.com>
+Date: Fri, 13 Dec 2024 16:37:24 +0800
+Subject: [PATCH] CMakeLists.txt: make DLT_WatchdogSec can be set by user
+
+In my test env, WatchdogSec default value 2 is not enough, manually
+changed to 3 is ok. This makes dlt.service/dlt-system.service start
+failed during boot time. So, make DLT_WatchdogSec can be set by user, so
+user can set them to proper value at build time, then service can start
+successfully in boot time.
+
+Signed-off-by: Changqing Li <changqing...@windriver.com>
+
+Upstream-Status: Backport 
[https://github.com/COVESA/dlt-daemon/pull/720/commits/bc03f142507da92add8ba325fdf8187d47a7d719]
+
+Signed-off-by: Changqing Li <changqing...@windriver.com>
+---
+ systemd/CMakeLists.txt | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt
+index 16cbe86b5..659378d16 100644
+--- a/systemd/CMakeLists.txt
++++ b/systemd/CMakeLists.txt
+@@ -18,10 +18,14 @@ if(WITH_SYSTEMD)
+     set(SYSTEMD_CONFIGURATIONS_FILES_DIR ${SYSTEMD_UNITDIR} )
+ 
+     if(WITH_SYSTEMD_WATCHDOG)
+-        set( DLT_WatchdogSec 2 )
++        if(NOT DEFINED DLT_WatchdogSec)
++            set(DLT_WatchdogSec 2 CACHE STRING "Watchdog timeout in seconds")
++        endif()
+         message( STATUS "The systemd watchdog is enabled - timeout is set to 
${DLT_WatchdogSec} seconds")
+     else(WITH_SYSTEMD_WATCHDOG)
+-        set( DLT_WatchdogSec 0 )
++        if(NOT DEFINED DLT_WatchdogSec)
++             set(DLT_WatchdogSec 0 CACHE STRING "Watchdog timeout in seconds")
++        endif()
+         message( STATUS "The systemd watchdog is disabled")
+     endif(WITH_SYSTEMD_WATCHDOG)
diff --git a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb 
b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb
index 3d2e4a73f1..888289b357 100644
--- a/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb
+++ b/meta-oe/recipes-extended/dlt-daemon/dlt-daemon_2.18.10.bb
@@ -19,6 +19,7 @@ SRC_URI = 
"git://github.com/COVESA/${BPN}.git;protocol=https;branch=master \
            file://0004-Modify-systemd-config-directory.patch \
            file://544.patch \
            file://567.patch \
+           
file://0001-CMakeLists-txt-make-DLT_WatchdogSec-can-be-set-by-user.patch \
            "
 SRCREV = "0f2d4cfffada6f8448a2cb27995b38eb4271044f"
 
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#115325): 
https://lists.openembedded.org/g/openembedded-devel/message/115325
Mute This Topic: https://lists.openembedded.org/mt/111096589/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to