From 78506c2f8618732b59eba68cd56d20a55c087006 Mon Sep 17 00:00:00 2001 From: vpeter4 Date: Mon, 3 Aug 2015 12:49:05 +0200 Subject: udoo: Switch to SPL support Currently we need to build one U-boot image for each of the udoo variants: quad and dual-lite. By switching to SPL we can support all two variants with a single binary. Based on the SPL for wandboard. Tested with OpenELEC (Open Embedded Linux Entertainment Center) on both boards. Signed-off-by: Peter Vicman Cc: Fabio Estevam Cc: Stefano Babic Acked-by: Stefano Babic Signed-off-by: Peter Vicman Acked-by: Fabio Estevam --- include/configs/udoo.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'include/configs') diff --git a/include/configs/udoo.h b/include/configs/udoo.h index 910bf01688..f93b67a5ae 100644 --- a/include/configs/udoo.h +++ b/include/configs/udoo.h @@ -11,6 +11,10 @@ #include "mx6_common.h" +#define CONFIG_SPL_MMC_SUPPORT +#define CONFIG_SPL_FAT_SUPPORT +#include "imx6_spl.h" + #define MACH_TYPE_UDOO 4800 #define CONFIG_MACH_TYPE MACH_TYPE_UDOO @@ -18,6 +22,7 @@ #define CONFIG_SYS_MALLOC_LEN (2 * SZ_1M) #define CONFIG_BOARD_EARLY_INIT_F +#define CONFIG_BOARD_LATE_INIT #define CONFIG_MXC_UART #define CONFIG_MXC_UART_BASE UART2_BASE @@ -58,7 +63,7 @@ /* MMC Configuration */ #define CONFIG_SYS_FSL_ESDHC_ADDR 0 -#define CONFIG_DEFAULT_FDT_FILE "imx6q-udoo.dtb" +#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG #define CONFIG_EXTRA_ENV_SETTINGS \ "script=boot.scr\0" \ @@ -67,7 +72,7 @@ "splashpos=m,m\0" \ "fdt_high=0xffffffff\0" \ "initrd_high=0xffffffff\0" \ - "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ + "fdt_file=undefined\0" \ "fdt_addr=0x18000000\0" \ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ @@ -134,9 +139,17 @@ "fi; " \ "else " \ "bootz; " \ - "fi;\0" + "fi;\0" \ + "findfdt=" \ + "if test $board_rev = MX6Q ; then " \ + "setenv fdt_file imx6q-udoo.dtb; fi; " \ + "if test $board_rev = MX6DL ; then " \ + "setenv fdt_file imx6dl-udoo.dtb; fi; " \ + "if test $fdt_file = undefined; then " \ + "echo WARNING: Could not determine dtb to use; fi; \0" #define CONFIG_BOOTCOMMAND \ + "run findfdt; " \ "mmc dev ${mmcdev}; if mmc rescan; then " \ "if run loadbootscript; then " \ "run bootscript; " \ -- cgit v1.2.1