summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/watchdog/watchdog_5.15.bb
diff options
context:
space:
mode:
authorFabio Berton <fabio.berton@ossystems.com.br>2016-08-26 16:55:01 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-09 11:53:36 +0100
commit7a79aba22be0ca0bc3535dea64a79b697013337d (patch)
treec8387acc99a77a447c26a059722d065a4df40151 /meta/recipes-extended/watchdog/watchdog_5.15.bb
parentf344440172df166a317cdfbf5ea4f295dbfc79d3 (diff)
downloadpoky-7a79aba22be0ca0bc3535dea64a79b697013337d.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. (From OE-Core rev: b76af8a0982c3c7473bd6ba067d1c8030d4d2f26) 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.bb23
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 \
12 file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \ 12 file://0001-Include-linux-param.h-for-EXEC_PAGESIZE-definition.patch \
13 file://watchdog-init.patch \ 13 file://watchdog-init.patch \
14 file://watchdog-conf.patch \ 14 file://watchdog-conf.patch \
15 file://wd_keepalive.init \
15" 16"
16 17
17SRC_URI[md5sum] = "678c32f6f35a0492c9c1b76b4aa88828" 18SRC_URI[md5sum] = "678c32f6f35a0492c9c1b76b4aa88828"
@@ -28,11 +29,27 @@ CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
28LDFLAGS_append_libc-musl = " -ltirpc " 29LDFLAGS_append_libc-musl = " -ltirpc "
29EXTRA_OECONF_append_libc-musl = " --disable-nfs " 30EXTRA_OECONF_append_libc-musl = " --disable-nfs "
30 31
31INITSCRIPT_NAME = "watchdog.sh" 32INITSCRIPT_PACKAGES = "${PN} ${PN}-keepalive"
32INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
33 33
34RRECOMMENDS_${PN} = "kernel-module-softdog" 34INITSCRIPT_NAME_${PN} = "watchdog.sh"
35INITSCRIPT_PARAMS_${PN} = "start 15 1 2 3 4 5 . stop 85 0 6 ."
36
37INITSCRIPT_NAME_${PN}-keepalive = "wd_keepalive"
38INITSCRIPT_PARAMS_${PN}-keepalive = "start 15 1 2 3 4 5 . stop 85 0 6 ."
35 39
36do_install_append() { 40do_install_append() {
37 install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh 41 install -D ${S}/redhat/watchdog.init ${D}/${sysconfdir}/init.d/watchdog.sh
42 install -Dm 0755 ${WORKDIR}/wd_keepalive.init ${D}${sysconfdir}/init.d/wd_keepalive
38} 43}
44
45PACKAGES =+ "${PN}-keepalive"
46
47FILES_${PN}-keepalive = " \
48 ${sysconfdir}/init.d/wd_keepalive \
49 ${sbindir}/wd_keepalive \
50"
51
52RDEPENDS_${PN} += "${PN}-keepalive"
53
54RRECOMMENDS_${PN} = "kernel-module-softdog"
55