From 61ddc75ecb082cba51fe7da4d0bc4c73c56abf38 Mon Sep 17 00:00:00 2001
Message-Id: <61ddc75ecb082cba51fe7da4d0bc4c73c56abf38.1543232476.git.aditya@kobol.io>
From: Aditya Prayoga <aditya@kobol.io>
Date: Mon, 26 Nov 2018 19:07:49 +0800
Subject: [PATCH] helios4: add boot-marvell.cmd backward compatibility

On system that still use boot.scr derived from boot-marvell.cmd, new
u-boot 2018 will failed load dtb and script due to missing some
variables. This will render the system unbootable.

These changes added the missing variables.

Signed-off-by: Aditya Prayoga <aditya@kobol.io>
---
 include/config_distro_bootcmd.h | 1 +
 include/configs/helios4.h       | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 373fee7..f469b2d 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -371,6 +371,7 @@
 	"boot_a_script="                                                  \
 		"load ${devtype} ${devnum}:${distro_bootpart} "           \
 			"${scriptaddr} ${prefix}${script}; "              \
+		"setenv boot_interface ${devtype};" \
 		"source ${scriptaddr}\0"                                  \
 	\
 	"scan_dev_for_scripts="                                           \
diff --git a/include/configs/helios4.h b/include/configs/helios4.h
index 6943378..299c58d 100644
--- a/include/configs/helios4.h
+++ b/include/configs/helios4.h
@@ -185,6 +185,8 @@
 	LOAD_ADDRESS_ENV_SETTINGS \
 	"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
 	"console=ttyS0,115200\0" \
+	"loadaddr=0x02000000\0" \
+	"fdt_addr=" FDT_ADDR_R "\0" \
 	BOOTENV
 
 #endif /* CONFIG_SPL_BUILD */
-- 
2.7.4

