om-watchdog: add support for Teltonika RUT5xx (ramips)
authorSteffen Weinreich <steve@weinreich.org>
Tue, 25 Apr 2017 14:44:39 +0000 (16:44 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Mon, 15 May 2017 20:43:33 +0000 (22:43 +0200)
Add rut5xx GPIO PIN selection to om-package startup script.

Testet on a RUT500 device, the timeout value of the hardware watchdog
is about 280 sec.

Signed-off-by: Steffen Weinreich <steve@weinreich.org>
[split into two commits, bump PKG_RELEASE]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
package/kernel/om-watchdog/Makefile
package/kernel/om-watchdog/files/om-watchdog.init

index cf92ffb641963382f5287b693bb0b4998888651c..403069b8166aeb323a716e9335753b9880b46fa5 100644 (file)
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=om-watchdog
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_VERSION:=1
 
 include $(INCLUDE_DIR)/package.mk
index 7d5d2165096fb84ffc1d8a5d6870f1813d60de34..906ee665fd85be7a8e9f42fe1d4679258d17ff71 100644 (file)
@@ -48,6 +48,15 @@ get_gpio() {
                        return 17
                        ;;
                esac
+       elif [ -r /lib/ramips.sh ]; then
+               . /lib/ramips.sh
+               local board=$(ramips_board_name)
+
+               case "$board" in
+               "rut5xx")
+                       return 11
+                       ;;
+               esac
        else
                #we assume it is om1p in this case
                return 3