[U-Boot] [PATCH 4/4] arm64: ls2080ardb: Add sd_bootcmd for distro fallback in case of sdboot
Shengzhou Liu
Shengzhou.Liu at nxp.com
Wed Aug 30 10:26:09 UTC 2017
Signed-off-by: Shengzhou Liu <Shengzhou.Liu at nxp.com>
---
include/configs/ls2080ardb.h | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index b309d79586..9458fda173 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -361,6 +361,12 @@ unsigned long get_board_sys_clk(void);
"esbc_validate 0x20700000 && " \
"esbc_validate 0x20740000;" \
"fsl_mc start mc 0x20a00000 0x20e00000 \0"
+#elif defined(CONFIG_SD_BOOT)
+#define MC_INIT_CMD \
+ "mcinitcmd=mmcinfo;mmc read 0x80000000 0x5000 0x800;" \
+ "mmc read 0x80100000 0x7000 0x800;" \
+ "fsl_mc start mc 0x80000000 0x80100000\0" \
+ "mcmemsize=0x70000000\0"
#else
#define MC_INIT_CMD \
"mcinitcmd=env exists secureboot && " \
@@ -391,7 +397,13 @@ unsigned long get_board_sys_clk(void);
"fdt_addr_r=0x90000000\0" \
"load_addr=0xa0000000\0" \
"kernel_size=0x2800000\0" \
+ "kernel_addr_sd=0x8000\0" \
+ "kernel_size_sd=0x14000\0" \
"console=ttyAMA0,38400n8\0" \
+ "sd_bootcmd=echo Trying load from SD ..;" \
+ "mmcinfo; mmc read $load_addr " \
+ "$kernel_addr_sd $kernel_size_sd; " \
+ "bootm $load_addr#$board\0" \
MC_INIT_CMD \
BOOTENV \
"boot_scripts=ls2088ardb_boot.scr\0" \
@@ -446,6 +458,11 @@ unsigned long get_board_sys_clk(void);
"fsl_mc lazyapply dpl 0x20d00000; " \
"run distro_bootcmd;run qspi_bootcmd; " \
"env exists secureboot && esbc_halt; "
+#elif defined(CONFIG_SD_BOOT) \
+ "env exists mcinitcmd && run mcinitcmd " \
+ "&& mmcinfo && mmc read 0x88000000 0x6800 0x800 " \
+ "&& fsl_mc apply dpl 0x88000000;" \
+ "run distro_bootcmd;run sd_bootcmd"
#else
/* Try to boot an on-NOR kernel first, then do normal distro boot */
#define CONFIG_BOOTCOMMAND \
--
2.14.1
More information about the U-Boot
mailing list