armv8: ls1046ardb: Add sd_bootcmd for distro fallback in case of sdboot
authorShengzhou Liu <Shengzhou.Liu@nxp.com>
Thu, 9 Nov 2017 09:57:56 +0000 (17:57 +0800)
committerYork Sun <york.sun@nxp.com>
Wed, 15 Nov 2017 18:56:22 +0000 (10:56 -0800)
Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
include/configs/ls1046a_common.h
include/configs/ls1046ardb.h

index eea54c7ae280eaf30ebc883bf43a6fedc26555fe..11f2a28743e741e271e82a86883ce9e7e3f47288 100644 (file)
        "kernel_start=0x1000000\0"              \
        "kernel_load=0xa0000000\0"              \
        "kernel_size=0x2800000\0"               \
+       "kernel_addr_sd=0x8000\0"               \
+       "kernel_size_sd=0x14000\0"              \
        "console=ttyS0,115200\0"                \
         CONFIG_MTDPARTS_DEFAULT "\0"           \
        BOOTENV                                 \
                        "${scripthdraddr} ${prefix}${boot_script_hdr} " \
                        "&& esbc_validate ${scripthdraddr};"    \
                "source ${scriptaddr}\0"          \
-       "installer=load mmc 0:2 $load_addr "          \
-               "/flex_installer_arm64.itb; "          \
-               "bootm $load_addr#ls1046ardb\0"  \
        "qspi_bootcmd=echo Trying load from qspi..;"      \
                "sf probe && sf read $load_addr "         \
-               "$kernel_start $kernel_size && bootm $load_addr#$board\0"
+               "$kernel_start $kernel_size && bootm $load_addr#$board\0" \
+       "sd_bootcmd=echo Trying load from SD ..;"       \
+               "mmcinfo; mmc read $load_addr "         \
+               "$kernel_addr_sd $kernel_size_sd && "   \
+               "bootm $load_addr#$board\0"
 
 #endif
 
index 87d6c810676f4ee21b430ddf45b4a69d98bd8440..d001b8027017957afd88387e5aeb95ae31dd093c 100644 (file)
 
 #ifndef SPL_NO_MISC
 #undef CONFIG_BOOTCOMMAND
+#if defined(CONFIG_QSPI_BOOT)
 #define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \
                           "&& esbc_halt; run qspi_bootcmd;"
+#elif defined(CONFIG_SD_BOOT)
+#define CONFIG_BOOTCOMMAND "run distro_bootcmd; env exists secureboot" \
+                          "&& esbc_halt; run sd_bootcmd;"
+#endif
 #endif
 
 #include <asm/fsl_secure_boot.h>