configs: imxrt1050-evk: enable distro bootcmd
PATCH 1/1 configs: imxrt1050-evk: enable distro bootcmd
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 <[email protected]>
--- configs/imxrt1050-evk_defconfig | 2 +- include/configs/imxrt1050-evk.h | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-)
configs/imxrt1050-evk_defconfig +1 -1
@@ -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
include/configs/imxrt1050-evk.h +14 -1
@@ -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 */
Signature · 1 line
2.40.1
Quoted 6 lines · Jesse Taube
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.hand set the device to mmc.Signed-off-by Jesse Taube <[email protected]>
A few things. In general, we should be switching to standard boot instead of the script-based distro_bootcmd. Second:
include/configs/imxrt1050-evk.h line 33
Quoted 6 lines
include/configs/imxrt1050-evk.h +6
-0+/* Config distro_bootcmd */ +#ifndef CONFIG_SPL_BUILD +#define BOOT_TARGET_DEVICES (func) \ + func(MMC, mmc, 0) +#include <config_distro_bootcmd.h> +#endif
It's not allowed to use checks for CONFIG_SPL_BUILD like this.
Signature · 1 line
Tom