[U-Boot] [PATCH 05/11] mx6sabresd: Add Windows boot support for iMX6 Sabre

Henry Beberman Henry.Beberman at microsoft.com
Sat Jul 14 00:11:49 UTC 2018


From: Henry Beberman <henry.beberman at microsoft.com>

This patch adds a new bootable configuration for Windows 10 IoT Core on
the i.MX6 Quad Sabre board.

Add a new device tree sources file for imx6qdl-sdb. This is not
required by Windows or UEFI but the build system requires a device
tree when building SPL with flat image tree support.

Signed-off-by: Henry Beberman <henry.beberman at microsoft.com>
Cc: Stefano Babic <sbabic at denx.de>
Cc: Fabio Estevam <fabio.estevam at nxp.com>
---
 arch/arm/dts/Makefile                   |  1 +
 arch/arm/dts/imx6qdl-sdb.dts            |  8 +++++
 board/freescale/mx6sabresd/MAINTAINERS  |  2 ++
 board/freescale/mx6sabresd/mx6sabresd.c |  9 ++++-
 configs/mx6sabresd_nt_defconfig         | 58 +++++++++++++++++++++++++++++++++
 include/configs/mx6sabre_common.h       | 10 ++++++
 6 files changed, 87 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/imx6qdl-sdb.dts
 create mode 100644 configs/mx6sabresd_nt_defconfig

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index baad87d4d7..7d90bd39f3 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -410,6 +410,7 @@ dtb-$(CONFIG_MX6QDL) += \
 	imx6dl-icore-mipi.dtb \
 	imx6dl-icore-rqs.dtb \
 	imx6dl-mamoj.dtb \
+	imx6qdl-sdb.dtb \
 	imx6q-cm-fx6.dtb \
 	imx6q-icore.dtb \
 	imx6q-icore-mipi.dtb \
diff --git a/arch/arm/dts/imx6qdl-sdb.dts b/arch/arm/dts/imx6qdl-sdb.dts
new file mode 100644
index 0000000000..907f44859f
--- /dev/null
+++ b/arch/arm/dts/imx6qdl-sdb.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2018 Microsoft Corporation
+ */
+
+/dts-v1/;
+
+#include "imx6q.dtsi"
diff --git a/board/freescale/mx6sabresd/MAINTAINERS b/board/freescale/mx6sabresd/MAINTAINERS
index 95752619e7..bc747e7d2a 100644
--- a/board/freescale/mx6sabresd/MAINTAINERS
+++ b/board/freescale/mx6sabresd/MAINTAINERS
@@ -4,3 +4,5 @@ S:	Maintained
 F:	board/freescale/mx6sabresd/
 F:	include/configs/mx6sabresd.h
 F:	configs/mx6sabresd_defconfig
+F:	configs/mx6sabresd_nt_defconfig
+F:	arch/arm/dts/imx6qdl-sdb.dts
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 0183ede148..9eae7140cf 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -229,7 +229,14 @@ static struct i2c_pads_info mx6dl_i2c_pad_info1 = {
 	}
 };
 
-static void setup_spi(void)
+#if defined(CONFIG_MULTI_DTB_FIT) || defined(CONFIG_SPL_LOAD_FIT)
+int board_fit_config_name_match(const char *name)
+{
+	return 0;
+}
+#endif
+
+static void __maybe_unused setup_spi(void)
 {
 	SETUP_IOMUX_PADS(ecspi1_pads);
 }
diff --git a/configs/mx6sabresd_nt_defconfig b/configs/mx6sabresd_nt_defconfig
new file mode 100644
index 0000000000..9d858a4418
--- /dev/null
+++ b/configs/mx6sabresd_nt_defconfig
@@ -0,0 +1,58 @@
+CONFIG_ARCH_MX6=y
+CONFIG_ARM=y
+CONFIG_SYS_TEXT_BASE=0x17800000
+CONFIG_TARGET_MX6SABRESD=y
+CONFIG_DEFAULT_DEVICE_TREE="imx6qdl-sdb"
+CONFIG_OF_CONTROL=y
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_SPL_OPTEE_BOOT=y
+CONFIG_BOOTDELAY=-2
+CONFIG_UEFI_BOOT=y
+CONFIG_UEFI_LOAD_ADDR=0x10820000
+CONFIG_EFI_LOADER=n
+CONFIG_CMD_BOOTD=n
+CONFIG_CMD_BOOTM=n
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_FAT=y
+# CONFIG_CMD_FLASH is not set
+CONFIG_CMD_GPIO=n
+CONFIG_CMD_I2C=y
+# CONFIG_CMD_IMLS is not set
+CONFIG_CMD_MMC=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_SPL=n
+CONFIG_CMD_USB=y
+CONFIG_HUSH_PARSER=y
+CONFIG_CONS_INDEX=1
+CONFIG_SECURE_BOOT=y
+CONFIG_FSL_ESDHC=y
+CONFIG_SPI_FLASH=n
+CONFIG_SPI_FLASH_STMICRO=n
+CONFIG_SPL=y
+CONFIG_SPL_FIT=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_SPL_LEGACY_IMAGE_SUPPORT=n
+CONFIG_SPL_OF_LIBFDT=y
+CONFIG_SPL_DM=n
+CONFIG_SPL_SYS_MALLOC_SIMPLE=y
+CONFIG_SPL_CRYPTO_SUPPORT=y
+CONFIG_SPL_GPIO_SUPPORT=y
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_SPL_MMC_SUPPORT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_USE_ARCH_MEMCPY=n
+CONFIG_SPL_WATCHDOG_SUPPORT=y
+CONFIG_SPL_LDSCRIPT="arch/arm/mach-imx/u-boot-spl-sram.lds"
+CONFIG_SYS_DCACHE_OFF=n
+CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/spl_sd.cfg"
+CONFIG_SYS_ICACHE_OFF=n
+CONFIG_SYS_L2CACHE_OFF=y
+CONFIG_SYS_MALLOC_F_LEN=0x800
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_USB=y
+CONFIG_USE_TINY_PRINTF=y
+CONFIG_VIDEO=y
+CONFIG_OF_LIBFDT=y
\ No newline at end of file
diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h
index 99ecc412a6..56186f323c 100644
--- a/include/configs/mx6sabre_common.h
+++ b/include/configs/mx6sabre_common.h
@@ -56,6 +56,15 @@
 #define EMMC_ENV ""
 #endif
 
+#ifdef CONFIG_UEFI_BOOT
+#include <config_uefi_bootcmd.h>
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	"mmcdev=1\0" \
+	BOOTENV
+
+#else
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	"script=boot.scr\0" \
 	"image=zImage\0" \
@@ -166,6 +175,7 @@
 			"fi; " \
 		"fi; " \
 	"else run netboot; fi"
+#endif /* CONFIG_UEFI_BOOT */
 
 #define CONFIG_ARP_TIMEOUT     200UL
 
-- 
2.16.2.gvfs.1.33.gf5370f1



More information about the U-Boot mailing list