[U-Boot] [v2 PATCH 3/4] Switch odroid to use config_distro_bootcmd.

Vagrant Cascadian vagrant at debian.org
Wed Sep 13 21:42:55 UTC 2017


Using distro_bootcmd standardizes board behavior across many
platforms. This is particularly useful for distributions supporting
multiple boards without requiring custom configuration for each board.

Signed-off-by: Vagrant Cascadian <vagrant at debian.org>
---

 include/configs/odroid.h | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/include/configs/odroid.h b/include/configs/odroid.h
index 573ccbdd36..731c607e70 100644
--- a/include/configs/odroid.h
+++ b/include/configs/odroid.h
@@ -43,7 +43,6 @@
 
 /* Console configuration */
 
-#define CONFIG_BOOTCOMMAND		"run autoboot"
 #define CONFIG_DEFAULT_CONSOLE		"ttySAC1,115200n8\0"
 
 #define CONFIG_SYS_INIT_SP_ADDR	(CONFIG_SYS_LOAD_ADDR \
@@ -85,6 +84,20 @@
 	"bl2 raw 0x1f 0x1d;" \
 	"tzsw raw 0x83f 0x138\0"
 
+#define BOOT_TARGET_DEVICES(func) \
+	func(MMC, mmc, 1) \
+	func(MMC, mmc, 0)
+
+#include <config_distro_bootcmd.h>
+
+#define MEM_LAYOUT_ENV_SETTINGS \
+	"bootm_size=0x10000000\0" \
+	"kernel_addr_r=0x42000000\0" \
+	"fdt_addr_r=0x43000000\0" \
+	"ramdisk_addr_r=0x43300000\0" \
+	"scriptaddr=0x50000000\0" \
+	"pxefile_addr_r=0x51000000\0"
+
 /*
  * Bootable media layout:
  * dev:    SD   eMMC(part boot)
@@ -171,7 +184,9 @@
 	"initrdname=uInitrd\0" \
 	"initrdaddr=42000000\0" \
 	"scriptaddr=0x42000000\0" \
-	"fdtaddr=40800000\0"
+	"fdtaddr=40800000\0" \
+	MEM_LAYOUT_ENV_SETTINGS \
+	BOOTENV
 
 /* GPT */
 #define CONFIG_RANDOM_UUID
-- 
2.11.0



More information about the U-Boot mailing list