OMAP watchdog enabled in Barebox and systemd

Watchdog is now automatically started at the moment
when kernel boot process begins and the device has 60 seconds
to boot and start systemd, or the watchdog will trigger
and force an immediate hard device restart.

Change-Id: I3c5de4e1ced8095388e90af1fba08e5a6a12a606
diff --git a/board/czechlight/beaglebone/barebox.env/boot/sd b/board/czechlight/beaglebone/barebox.env/boot/sd
index a25f2d8..2aa7912 100644
--- a/board/czechlight/beaglebone/barebox.env/boot/sd
+++ b/board/czechlight/beaglebone/barebox.env/boot/sd
@@ -8,3 +8,4 @@
 # global.bootm.initrd=<path to initrd>
 
 global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
+global.linux.bootargs.base="omap_wdt.early_enable=1"
diff --git a/board/czechlight/beaglebone/barebox.env/config-board b/board/czechlight/beaglebone/barebox.env/config-board
index cd7b26d..042ed45 100644
--- a/board/czechlight/beaglebone/barebox.env/config-board
+++ b/board/czechlight/beaglebone/barebox.env/config-board
@@ -1,4 +1,4 @@
 #!/bin/sh
 
 global.boot.default=sd
-
+global.boot.watchdog_timeout=60
diff --git a/board/czechlight/common/systemd-watchdog.sh b/board/czechlight/common/systemd-watchdog.sh
new file mode 100755
index 0000000..07ad9f0
--- /dev/null
+++ b/board/czechlight/common/systemd-watchdog.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+set -eux
+
+sed -i -E "s/(#?)ShutdownWatchdogSec=(.*)/ShutdownWatchdogSec=60/" ${TARGET_DIR}/etc/systemd/system.conf
+sed -i -E "s/(#?)RuntimeWatchdogSec=(.*)/RuntimeWatchdogSec=60/" ${TARGET_DIR}/etc/systemd/system.conf