clearfog: Squash all U-Boot patches to a single file

...because that's going to be a smaller maintenance PITA. I'm still
tracking my changes in git for the upstream U-Boot, of course, but
there's no point in duplicating that here.

Change-Id: I89c853159dd4e474aa8b83ea8fc097f5703263f1
diff --git a/board/czechlight/clearfog/patches/u-boot/0001-clearfog-Unconditionally-enable-watchdog-timer.patch b/board/czechlight/clearfog/patches/u-boot/0001-clearfog-Unconditionally-enable-watchdog-timer.patch
deleted file mode 100644
index c24ee97..0000000
--- a/board/czechlight/clearfog/patches/u-boot/0001-clearfog-Unconditionally-enable-watchdog-timer.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From e5d8ae27ae561e760a9a6d0074a4df147a1959cc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jan.kundrat@cesnet.cz>
-Date: Fri, 29 Sep 2017 18:11:04 +0200
-Subject: [PATCH 1/5] clearfog: Unconditionally enable watchdog timer
-
-We will only be booting kernels that support the watchdog, so there's no
-risk in leaving our WD running while we hand over to the kernel.
-
-The code was copied from the Turris Omnia version and used as-is. The
-only exception is the built-in MCU reset which is not present on our
-boards.
----
- board/solidrun/clearfog/clearfog.c | 43 ++++++++++++++++++++++++++++++++++++++
- configs/clearfog_defconfig         |  2 ++
- include/configs/clearfog.h         |  5 +++++
- 3 files changed, 50 insertions(+)
-
-diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
-index 8906636f76..f94bd5e465 100644
---- a/board/solidrun/clearfog/clearfog.c
-+++ b/board/solidrun/clearfog/clearfog.c
-@@ -11,10 +11,15 @@
- #include <asm/io.h>
- #include <asm/arch/cpu.h>
- #include <asm/arch/soc.h>
-+#include <dm/uclass.h>
- 
- #include "../drivers/ddr/marvell/a38x/ddr3_a38x_topology.h"
- #include <../serdes/a38x/high_speed_env_spec.h>
- 
-+#ifdef CONFIG_WDT_ORION
-+# include <wdt.h>
-+#endif
-+
- DECLARE_GLOBAL_DATA_PTR;
- 
- #define ETH_PHY_CTRL_REG		0
-@@ -122,6 +127,10 @@ int board_early_init_f(void)
- 	return 0;
- }
- 
-+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT_ORION)
-+static struct udevice *watchdog_dev = NULL;
-+#endif
-+
- int board_init(void)
- {
- 	int i;
-@@ -129,6 +138,18 @@ int board_init(void)
- 	/* Address of boot parameters */
- 	gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
- 
-+#ifndef CONFIG_SPL_BUILD
-+# ifdef CONFIG_WDT_ORION
-+        if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
-+                puts("Cannot find Armada 385 watchdog!\n");
-+        } else {
-+                puts("Enabling Armada 385 watchdog.\n");
-+		/* one minute */
-+                wdt_start(watchdog_dev, (u32) 25000000 * 60, 0);
-+        }
-+# endif
-+#endif
-+
- 	/* Toggle GPIO41 to reset onboard switch and phy */
- 	clrbits_le32(MVEBU_GPIO1_BASE + 0x0, BIT(9));
- 	clrbits_le32(MVEBU_GPIO1_BASE + 0x4, BIT(9));
-@@ -147,6 +168,28 @@ int board_init(void)
- 	return 0;
- }
- 
-+#ifdef CONFIG_WATCHDOG
-+/* Called by macro WATCHDOG_RESET */
-+void watchdog_reset(void)
-+{
-+# if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT_ORION)
-+        static ulong next_reset = 0;
-+        ulong now;
-+
-+        if (!watchdog_dev)
-+                return;
-+
-+        now = timer_get_us();
-+
-+        /* Do not reset the watchdog too often */
-+        if (now > next_reset) {
-+                wdt_reset(watchdog_dev);
-+                next_reset = now + 1000;
-+        }
-+# endif
-+}
-+#endif
-+
- int checkboard(void)
- {
- 	puts("Board: SolidRun ClearFog\n");
-diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
-index 5eceacf491..fd48b0db02 100644
---- a/configs/clearfog_defconfig
-+++ b/configs/clearfog_defconfig
-@@ -46,3 +46,5 @@ CONFIG_USB=y
- CONFIG_DM_USB=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_STORAGE=y
-+CONFIG_WDT=y
-+CONFIG_WDT_ORION=y
-diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
-index 5061f6c6fd..eac1e8bbce 100644
---- a/include/configs/clearfog.h
-+++ b/include/configs/clearfog.h
-@@ -32,6 +32,11 @@
- #define CONFIG_SYS_I2C_SLAVE		0x0
- #define CONFIG_SYS_I2C_SPEED		100000
- 
-+/* Watchdog */
-+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT_ORION)
-+# define CONFIG_WATCHDOG
-+#endif
-+
- /* SPI NOR flash default params, used by sf commands */
- #define CONFIG_SF_DEFAULT_SPEED		1000000
- #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_3
--- 
-2.14.1
-
diff --git a/board/czechlight/clearfog/patches/u-boot/0002-clearfog-Add-another-redundant-environment-storage.patch b/board/czechlight/clearfog/patches/u-boot/0002-clearfog-Add-another-redundant-environment-storage.patch
deleted file mode 100644
index 22233ce..0000000
--- a/board/czechlight/clearfog/patches/u-boot/0002-clearfog-Add-another-redundant-environment-storage.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 2efee00c747c83a7255c6fabc573da1210d5e45c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jan.kundrat@cesnet.cz>
-Date: Tue, 10 Oct 2017 20:49:41 +0200
-Subject: [PATCH 2/5] clearfog: Add another, redundant environment storage
-
----
- include/configs/clearfog.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
-index eac1e8bbce..8f87eca771 100644
---- a/include/configs/clearfog.h
-+++ b/include/configs/clearfog.h
-@@ -70,6 +70,9 @@
- #define CONFIG_ENV_OFFSET		0xf0000
- #define CONFIG_ENV_ADDR			CONFIG_ENV_OFFSET
- 
-+#define CONFIG_ENV_OFFSET_REDUND	0xe0000
-+#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
-+
- #define CONFIG_PHY_MARVELL		/* there is a marvell phy */
- #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
- 
--- 
-2.14.1
-
diff --git a/board/czechlight/clearfog/patches/u-boot/0003-clearfog-hard-code-the-RAUC-redundant-boot-to-uboot-.patch b/board/czechlight/clearfog/patches/u-boot/0003-clearfog-hard-code-the-RAUC-redundant-boot-to-uboot-.patch
deleted file mode 100644
index 5eb1a7d..0000000
--- a/board/czechlight/clearfog/patches/u-boot/0003-clearfog-hard-code-the-RAUC-redundant-boot-to-uboot-.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 9b36966ce24325309993e74df86ec60fe9976964 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jan.kundrat@cesnet.cz>
-Date: Wed, 11 Oct 2017 11:51:14 +0200
-Subject: [PATCH 3/5] clearfog: hard-code the RAUC redundant boot to uboot's
- config
-
-...so that we can save one partition and an extra detour via a boot.scr
-in there.
-
-The "|| reset" are required because the watchdog timer is left running
-*and* being periodically reset from within the uboot's prompt, which
-completely defeats the point of our logic.
----
- include/configs/clearfog.h | 39 +++++++++++++++++++++++++++++++++++----
- 1 file changed, 35 insertions(+), 4 deletions(-)
-
-diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
-index 8f87eca771..bd2cc3c26e 100644
---- a/include/configs/clearfog.h
-+++ b/include/configs/clearfog.h
-@@ -174,14 +174,45 @@
- 	"scriptaddr=" SCRIPT_ADDR_R "\0" \
- 	"pxefile_addr_r=" PXEFILE_ADDR_R "\0"
- 
--#include <config_distro_bootcmd.h>
--
- #define CONFIG_EXTRA_ENV_SETTINGS \
- 	RELOCATION_LIMITS_ENV_SETTINGS \
- 	LOAD_ADDRESS_ENV_SETTINGS \
--	"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
- 	"console=ttyS0,115200\0" \
--	BOOTENV
-+	"bootcmd=test -n \"${BOOT_A_LEFT}\" || setenv BOOT_A_LEFT 3;" \
-+	"test -n \"${BOOT_B_LEFT}\" || setenv BOOT_B_LEFT 3;" \
-+	"setenv rauc_part;" \
-+	"for BOOT_SLOT in \"A B\"; do" \
-+	"  if test \"x${rauc_part}\" != \"x\"; then" \
-+	"    ;" \
-+	"  elif test \"x${BOOT_SLOT}\" = \"xA\"; then" \
-+	"    if test ${BOOT_A_LEFT} -gt 0; then" \
-+	"      setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1;" \
-+	"      echo \"Found valid slot A, ${BOOT_A_LEFT} attempts remaining\";" \
-+	"      setenv rauc_part 1;" \
-+	"      setenv rauc_slot A;" \
-+	"    fi;" \
-+	"  elif test \"x${BOOT_SLOT}\" = \"xB\"; then" \
-+	"    if test ${BOOT_B_LEFT} -gt 0; then" \
-+	"      setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1;" \
-+	"      echo \"Found valid slot B, ${BOOT_B_LEFT} attempts remaining\";" \
-+	"      setenv rauc_part 2;" \
-+	"      setenv rauc_slot B;" \
-+	"    fi;" \
-+	"  fi;" \
-+	"done;" \
-+	"if test -n \"${rauc_part}\"; then" \
-+	"  saveenv ;" \
-+	"else" \
-+	"  echo \"No valid slot found, resetting tries to 3\";" \
-+	"  setenv BOOT_A_LEFT 3;" \
-+	"  setenv BOOT_B_LEFT 3;" \
-+	"  saveenv;" \
-+	"  reset;" \
-+	"fi;" \
-+	"setenv bootargs root=/dev/mmcblk0p${rauc_part} rauc.slot=${rauc_slot} czechlight=${czechlight};" \
-+	"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"
- 
- #endif /* CONFIG_SPL_BUILD */
- 
--- 
-2.14.1
-
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
deleted file mode 100644
index aabbf13..0000000
--- a/board/czechlight/clearfog/patches/u-boot/0004-clearfog-Auto-reboot-on-panic-and-oops.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 7273b75a769bb39315b21159b6bc0d2da43cf01e 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/5] 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/board/czechlight/clearfog/patches/u-boot/0005-clearfog-Move-all-extra-bootargs-to-a-special-variab.patch b/board/czechlight/clearfog/patches/u-boot/0005-clearfog-Move-all-extra-bootargs-to-a-special-variab.patch
deleted file mode 100644
index 71eaaaa..0000000
--- a/board/czechlight/clearfog/patches/u-boot/0005-clearfog-Move-all-extra-bootargs-to-a-special-variab.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 9b6df01de8944114d5563a434df143be1ed2dad1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= <jan.kundrat@cesnet.cz>
-Date: Thu, 19 Oct 2017 11:45:23 +0200
-Subject: [PATCH 5/5] clearfog: Move all extra bootargs to a special variable
-
-I have two reasons for this, and both of them center around making it
-possible to perform changes to the boot process.
-
-It is quite dangerous to attempt to re-flash the entire card, including
-the bootloader, on the fly. Moving as much bits as possible to the
-environment makes it a bit easier to introduce important changes such
-as, for example, volatile rootfs, later on.
-
-The second one is for testing -- it's much easier to just rewrite one
-reasonable variable. Changes no longer require struggling with overly
-long lines (bootcmd), at least.
----
- include/configs/clearfog.h | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
-index d251278885..04faf5c49f 100644
---- a/include/configs/clearfog.h
-+++ b/include/configs/clearfog.h
-@@ -178,6 +178,7 @@
- 	RELOCATION_LIMITS_ENV_SETTINGS \
- 	LOAD_ADDRESS_ENV_SETTINGS \
- 	"console=ttyS0,115200\0" \
-+	"extra_bootargs=panic=10 oops=panic\0" \
- 	"bootcmd=test -n \"${BOOT_A_LEFT}\" || setenv BOOT_A_LEFT 3;" \
- 	"test -n \"${BOOT_B_LEFT}\" || setenv BOOT_B_LEFT 3;" \
- 	"setenv rauc_part;" \
-@@ -209,7 +210,7 @@
- 	"  saveenv;" \
- 	"  reset;" \
- 	"fi;" \
--	"setenv bootargs root=/dev/mmcblk0p${rauc_part} rauc.slot=${rauc_slot} czechlight=${czechlight} panic=10 oops=panic;" \
-+	"setenv bootargs root=/dev/mmcblk0p${rauc_part} rauc.slot=${rauc_slot} czechlight=${czechlight} ${extra_bootargs};" \
- 	"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/board/czechlight/clearfog/patches/u-boot/boot.patch b/board/czechlight/clearfog/patches/u-boot/boot.patch
new file mode 100644
index 0000000..3ec36c0
--- /dev/null
+++ b/board/czechlight/clearfog/patches/u-boot/boot.patch
@@ -0,0 +1,166 @@
+diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
+index 8906636f76..f94bd5e465 100644
+--- a/board/solidrun/clearfog/clearfog.c
++++ b/board/solidrun/clearfog/clearfog.c
+@@ -11,10 +11,15 @@
+ #include <asm/io.h>
+ #include <asm/arch/cpu.h>
+ #include <asm/arch/soc.h>
++#include <dm/uclass.h>
+ 
+ #include "../drivers/ddr/marvell/a38x/ddr3_a38x_topology.h"
+ #include <../serdes/a38x/high_speed_env_spec.h>
+ 
++#ifdef CONFIG_WDT_ORION
++# include <wdt.h>
++#endif
++
+ DECLARE_GLOBAL_DATA_PTR;
+ 
+ #define ETH_PHY_CTRL_REG		0
+@@ -122,6 +127,10 @@ int board_early_init_f(void)
+ 	return 0;
+ }
+ 
++#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT_ORION)
++static struct udevice *watchdog_dev = NULL;
++#endif
++
+ int board_init(void)
+ {
+ 	int i;
+@@ -129,6 +138,18 @@ int board_init(void)
+ 	/* Address of boot parameters */
+ 	gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
+ 
++#ifndef CONFIG_SPL_BUILD
++# ifdef CONFIG_WDT_ORION
++        if (uclass_get_device(UCLASS_WDT, 0, &watchdog_dev)) {
++                puts("Cannot find Armada 385 watchdog!\n");
++        } else {
++                puts("Enabling Armada 385 watchdog.\n");
++		/* one minute */
++                wdt_start(watchdog_dev, (u32) 25000000 * 60, 0);
++        }
++# endif
++#endif
++
+ 	/* Toggle GPIO41 to reset onboard switch and phy */
+ 	clrbits_le32(MVEBU_GPIO1_BASE + 0x0, BIT(9));
+ 	clrbits_le32(MVEBU_GPIO1_BASE + 0x4, BIT(9));
+@@ -147,6 +168,28 @@ int board_init(void)
+ 	return 0;
+ }
+ 
++#ifdef CONFIG_WATCHDOG
++/* Called by macro WATCHDOG_RESET */
++void watchdog_reset(void)
++{
++# if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT_ORION)
++        static ulong next_reset = 0;
++        ulong now;
++
++        if (!watchdog_dev)
++                return;
++
++        now = timer_get_us();
++
++        /* Do not reset the watchdog too often */
++        if (now > next_reset) {
++                wdt_reset(watchdog_dev);
++                next_reset = now + 1000;
++        }
++# endif
++}
++#endif
++
+ int checkboard(void)
+ {
+ 	puts("Board: SolidRun ClearFog\n");
+diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
+index 5eceacf491..fd48b0db02 100644
+--- a/configs/clearfog_defconfig
++++ b/configs/clearfog_defconfig
+@@ -46,3 +46,5 @@ CONFIG_USB=y
+ CONFIG_DM_USB=y
+ CONFIG_USB_EHCI_HCD=y
+ CONFIG_USB_STORAGE=y
++CONFIG_WDT=y
++CONFIG_WDT_ORION=y
+diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
+index 5061f6c6fd..04faf5c49f 100644
+--- a/include/configs/clearfog.h
++++ b/include/configs/clearfog.h
+@@ -32,6 +32,11 @@
+ #define CONFIG_SYS_I2C_SLAVE		0x0
+ #define CONFIG_SYS_I2C_SPEED		100000
+ 
++/* Watchdog */
++#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT_ORION)
++# define CONFIG_WATCHDOG
++#endif
++
+ /* SPI NOR flash default params, used by sf commands */
+ #define CONFIG_SF_DEFAULT_SPEED		1000000
+ #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_3
+@@ -65,6 +70,9 @@
+ #define CONFIG_ENV_OFFSET		0xf0000
+ #define CONFIG_ENV_ADDR			CONFIG_ENV_OFFSET
+ 
++#define CONFIG_ENV_OFFSET_REDUND	0xe0000
++#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
++
+ #define CONFIG_PHY_MARVELL		/* there is a marvell phy */
+ #define PHY_ANEG_TIMEOUT	8000	/* PHY needs a longer aneg time */
+ 
+@@ -166,14 +174,46 @@
+ 	"scriptaddr=" SCRIPT_ADDR_R "\0" \
+ 	"pxefile_addr_r=" PXEFILE_ADDR_R "\0"
+ 
+-#include <config_distro_bootcmd.h>
+-
+ #define CONFIG_EXTRA_ENV_SETTINGS \
+ 	RELOCATION_LIMITS_ENV_SETTINGS \
+ 	LOAD_ADDRESS_ENV_SETTINGS \
+-	"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
+ 	"console=ttyS0,115200\0" \
+-	BOOTENV
++	"extra_bootargs=panic=10 oops=panic\0" \
++	"bootcmd=test -n \"${BOOT_A_LEFT}\" || setenv BOOT_A_LEFT 3;" \
++	"test -n \"${BOOT_B_LEFT}\" || setenv BOOT_B_LEFT 3;" \
++	"setenv rauc_part;" \
++	"for BOOT_SLOT in \"A B\"; do" \
++	"  if test \"x${rauc_part}\" != \"x\"; then" \
++	"    ;" \
++	"  elif test \"x${BOOT_SLOT}\" = \"xA\"; then" \
++	"    if test ${BOOT_A_LEFT} -gt 0; then" \
++	"      setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1;" \
++	"      echo \"Found valid slot A, ${BOOT_A_LEFT} attempts remaining\";" \
++	"      setenv rauc_part 1;" \
++	"      setenv rauc_slot A;" \
++	"    fi;" \
++	"  elif test \"x${BOOT_SLOT}\" = \"xB\"; then" \
++	"    if test ${BOOT_B_LEFT} -gt 0; then" \
++	"      setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1;" \
++	"      echo \"Found valid slot B, ${BOOT_B_LEFT} attempts remaining\";" \
++	"      setenv rauc_part 2;" \
++	"      setenv rauc_slot B;" \
++	"    fi;" \
++	"  fi;" \
++	"done;" \
++	"if test -n \"${rauc_part}\"; then" \
++	"  saveenv ;" \
++	"else" \
++	"  echo \"No valid slot found, resetting tries to 3\";" \
++	"  setenv BOOT_A_LEFT 3;" \
++	"  setenv BOOT_B_LEFT 3;" \
++	"  saveenv;" \
++	"  reset;" \
++	"fi;" \
++	"setenv bootargs root=/dev/mmcblk0p${rauc_part} rauc.slot=${rauc_slot} czechlight=${czechlight} ${extra_bootargs};" \
++	"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"
+ 
+ #endif /* CONFIG_SPL_BUILD */
+ 
diff --git a/configs/czechlight_clearfog_defconfig b/configs/czechlight_clearfog_defconfig
index fb93b45..305370a 100644
--- a/configs/czechlight_clearfog_defconfig
+++ b/configs/czechlight_clearfog_defconfig
@@ -43,7 +43,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-clearfog-Unconditionally-enable-watchdog-timer.patch $(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/patches/u-boot/0002-clearfog-Add-another-redundant-environment-storage.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_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/patches/u-boot/0005-clearfog-Move-all-extra-bootargs-to-a-special-variab.patch"
+BR2_TARGET_UBOOT_PATCH="$(BR2_EXTERNAL_CZECHLIGHT_PATH)/board/czechlight/clearfog/patches/u-boot/boot.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