diff options
author | Fabio Berton <fabio.berton@ossystems.com.br> | 2016-08-26 16:55:01 -0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-09 11:52:09 +0100 |
commit | b76af8a0982c3c7473bd6ba067d1c8030d4d2f26 (patch) | |
tree | c57bd2c414c0604e485e6b3ddfecd81b835f353c /meta/recipes-extended/watchdog/watchdog_5.15.bb | |
parent | ea2f99161a22ae2e9eefd3b337c9af7704c33e37 (diff) | |
download | openembedded-core-contrib-b76af8a0982c3c7473bd6ba067d1c8030d4d2f26.tar.gz |
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 <fabio.berton@ossystems.com.br>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/watchdog/watchdog_5.15.bb')
-rw-r--r-- | meta/recipes-extended/watchdog/watchdog_5.15.bb | 23 |
1 files changed, 20 insertions, 3 deletions
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" + |