From b76af8a0982c3c7473bd6ba067d1c8030d4d2f26 Mon Sep 17 00:00:00 2001 From: Fabio Berton Date: Fri, 26 Aug 2016 16:55:01 -0300 Subject: watchdog: Add wd_keepalive package This is a simplified version of the watchdog daemon. It only opens /dev/watchdog, and keeps writing to it often enough to keep the kernel from resetting, at least once per minute. Each write delays the reboot time another minute. After a minute of inactivity the watchdog hardware will cause a reset. In the case of the software watchdog the ability to reboot will depend on the state of the machines and interrupts. Installs wd_keepalive binary and enable initscript. Signed-off-by: Fabio Berton Signed-off-by: Otavio Salvador Signed-off-by: Richard Purdie --- meta/recipes-extended/watchdog/watchdog_5.15.bb | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'meta/recipes-extended/watchdog/watchdog_5.15.bb') diff --git a/meta/recipes-extended/watchdog/watchdog_5.15.bb b/meta/recipes-extended/watchdog/watchdog_5.15.bb index ee1a8933ef..1c0049c7af 100644 --- a/meta/recipes-extended/watchdog/watchdog_5.15.bb +++ b/meta/recipes-extended/watchdog/watchdog_5.15.bb @@ -12,6 +12,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/watchdog/watchdog-${PV}.tar.gz \ file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \ file://watchdog-init.patch \ file://watchdog-conf.patch \ + file://wd_keepalive.init \ " SRC_URI[md5sum] = "678c32f6f35a0492c9c1b76b4aa88828" @@ -28,11 +29,27 @@ CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc " LDFLAGS_append_libc-musl = " -ltirpc " EXTRA_OECONF_append_libc-musl = " --disable-nfs " -INITSCRIPT_NAME = "watchdog.sh" -INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ." +INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive" -RRECOMMENDS_${PN} = "kernel-module-softdog" +INITSCRIPT_NAME_${PN} = "watchdog.sh" +INITSCRIPT_PARAMS_${PN} = "start 15 1 2 3 4 5 . stop 85 0 6 ." + +INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive" +INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ." do_install_append() { install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh + install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive } + +PACKAGES =+ "${PN}-keepalive" + +FILES_${PN}-keepalive = " \ + ${sysconfdir}/init.d/wd_keepalive \ + ${sbindir}/wd_keepalive \ +" + +RDEPENDS_${PN} += "${PN}-keepalive" + +RRECOMMENDS_${PN} = "kernel-module-softdog" + -- cgit 1.2.3-korg