clearfog: Reboot on panic
...which now includes FS errors as well as oopses and general panics. In
short, let's use that redundant rootfs that we have.
I wonder if this is going to bite me in the ass in future (or when).
Change-Id: I740cdd19c16492856d9adc8e646f79c637e30950
diff --git a/board/czechlight/clearfog/patches/u-boot/0004-clearfog-Auto-reboot-on-panic-and-oops.patch b/board/czechlight/clearfog/patches/u-boot/0004-clearfog-Auto-reboot-on-panic-and-oops.patch
new file mode 100644
index 0000000..c90fa80
--- /dev/null
+++ b/board/czechlight/clearfog/patches/u-boot/0004-clearfog-Auto-reboot-on-panic-and-oops.patch
@@ -0,0 +1,25 @@
+From 4573fe220f3ea05c0648a0e1776aa64979eff683 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jan.kundrat@cesnet.cz>
+Date: Wed, 11 Oct 2017 14:42:51 +0200
+Subject: [PATCH 4/4] clearfog: Auto-reboot on panic and oops
+
+---
+ include/configs/clearfog.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
+index bd2cc3c26e..d251278885 100644
+--- a/include/configs/clearfog.h
++++ b/include/configs/clearfog.h
+@@ -209,7 +209,7 @@
+ " saveenv;" \
+ " reset;" \
+ "fi;" \
+- "setenv bootargs root=/dev/mmcblk0p${rauc_part} rauc.slot=${rauc_slot} czechlight=${czechlight};" \
++ "setenv bootargs root=/dev/mmcblk0p${rauc_part} rauc.slot=${rauc_slot} czechlight=${czechlight} panic=10 oops=panic;" \
+ "load mmc 0:${rauc_part} ${fdt_addr_r} /boot/armada-388-clearfog-base.dtb || reset;" \
+ "load mmc 0:${rauc_part} ${kernel_addr_r} /boot/zImage || reset;" \
+ "bootz ${kernel_addr_r} - ${fdt_addr_r} || reset\0"
+--
+2.14.1
+
diff --git a/configs/czechlight_clearfog_defconfig b/configs/czechlight_clearfog_defconfig
index 4647e25..960e4c8 100644
--- a/configs/czechlight_clearfog_defconfig
+++ b/configs/czechlight_clearfog_defconfig
@@ -41,7 +41,7 @@
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.09"
-BR2_TARGET_UBOOT_PATCH="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/patches/u-boot/0001-Unconditionally-enable-watchdog-timer-on-Clearfog.patch $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/patches/u-boot/0002-Add-another-redundant-storage-for-the-environment.patch $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/patches/u-boot/0003-clearfog-hard-code-the-RAUC-redundant-boot-to-uboot-.patch"
+BR2_TARGET_UBOOT_PATCH="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/patches/u-boot/0001-Unconditionally-enable-watchdog-timer-on-Clearfog.patch $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/patches/u-boot/0002-Add-another-redundant-storage-for-the-environment.patch $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/patches/u-boot/0003-clearfog-hard-code-the-RAUC-redundant-boot-to-uboot-.patch $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/patches/u-boot/0004-clearfog-Auto-reboot-on-panic-and-oops.patch"
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="clearfog"
BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/uboot.fragment"
# BR2_TARGET_UBOOT_FORMAT_BIN is not set