Add watchdogd
"/sbin/watchdogd <interval> <margin>" will open /dev/watchdog, try
to set the timeout to <interval>+<margin> then write to it every
<interval> seconds to reset the watchdog.
Change-Id: I15571980cdb868ec19f20e80bf8274b32107d36d
diff --git a/init/Android.mk b/init/Android.mk
index 7dae9df..a1c1e7a 100644
--- a/init/Android.mk
+++ b/init/Android.mk
@@ -15,7 +15,8 @@
signal_handler.c \
init_parser.c \
ueventd.c \
- ueventd_parser.c
+ ueventd_parser.c \
+ watchdogd.c
ifeq ($(strip $(INIT_BOOTCHART)),true)
LOCAL_SRC_FILES += bootchart.c
@@ -42,8 +43,11 @@
include $(BUILD_EXECUTABLE)
-# Make a symlink from /sbin/ueventd to /init
-SYMLINKS := $(TARGET_ROOT_OUT)/sbin/ueventd
+# Make a symlink from /sbin/ueventd and /sbin/watchdogd to /init
+SYMLINKS := \
+ $(TARGET_ROOT_OUT)/sbin/ueventd \
+ $(TARGET_ROOT_OUT)/sbin/watchdogd
+
$(SYMLINKS): INIT_BINARY := $(LOCAL_MODULE)
$(SYMLINKS): $(LOCAL_INSTALLED_MODULE) $(LOCAL_PATH)/Android.mk
@echo "Symlink: $@ -> ../$(INIT_BINARY)"