[PATCH v1] configs: imxrt1050-evk: enable distro bootcmd

Jesse Taube mr.bossman075 at gmail.com
Mon Sep 18 05:47:34 CEST 2023


Add support to boot from script.scr from mmc.

imxrt1050-evk was not able to boot from script.scr because we did not
include config_distro_bootcmd.h and set the device to mmc.

Signed-off-by: Jesse Taube <Mr.Bossman075 at gmail.com>
---
 configs/imxrt1050-evk_defconfig |  2 +-
 include/configs/imxrt1050-evk.h | 15 ++++++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/configs/imxrt1050-evk_defconfig b/configs/imxrt1050-evk_defconfig
index cbf9469b24..35c0364e6b 100644
--- a/configs/imxrt1050-evk_defconfig
+++ b/configs/imxrt1050-evk_defconfig
@@ -25,7 +25,6 @@ CONFIG_HAVE_SYS_UBOOT_START=y
 CONFIG_SYS_UBOOT_START=0x800023FD
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_SD_BOOT=y
-# CONFIG_USE_BOOTCOMMAND is not set
 CONFIG_SYS_CONSOLE_ENV_OVERWRITE=y
 # CONFIG_DISPLAY_CPUINFO is not set
 CONFIG_SPL_NO_BSS_LIMIT=y
@@ -40,6 +39,7 @@ CONFIG_SYS_PBSIZE=276
 # CONFIG_BOOTM_PLAN9 is not set
 # CONFIG_BOOTM_RTEMS is not set
 # CONFIG_BOOTM_VXWORKS is not set
+CONFIG_CMD_MMC=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_MII is not set
 # CONFIG_SPL_DOS_PARTITION is not set
diff --git a/include/configs/imxrt1050-evk.h b/include/configs/imxrt1050-evk.h
index 2af2dde2ae..4b78d61d3f 100644
--- a/include/configs/imxrt1050-evk.h
+++ b/include/configs/imxrt1050-evk.h
@@ -19,10 +19,23 @@
 					 DMAMEM_SZ_ALL)
 
 #ifdef CONFIG_VIDEO
-#define CFG_EXTRA_ENV_SETTINGS \
+#define ENV_DEVICE_SETTINGS \
 		"stdin=serial\0" \
 		"stdout=serial,vidconsole\0" \
 		"stderr=serial,vidconsole\0"
 #endif
 
+/* Config distro_bootcmd */
+#ifndef CONFIG_SPL_BUILD
+#define BOOT_TARGET_DEVICES(func) \
+	func(MMC, mmc, 0)
+#include <config_distro_bootcmd.h>
+#endif
+
+#define CFG_EXTRA_ENV_SETTINGS \
+	ENV_DEVICE_SETTINGS \
+	BOOTENV \
+	"scriptaddr=" __stringify(PHYS_SDRAM) "\0" \
+	"kernel_addr_r" __stringify(PHYS_SDRAM) "\0"
+
 #endif /* __IMXRT1050_EVK_H */
-- 
2.40.1



More information about the U-Boot mailing list