Fixes for TFABOOT framework
- update eMMC bootsrc to SD_MMC
- Increase buffer size for mcinitcmd from 256 to 512
- Fix mcinitcmd and bootcmd for Secure Boot
Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
break;
case RCW_SRC_EMMC_VAL:
/* RCW SRC EMMC */
- src = BOOT_SOURCE_SD_MMC2;
+ src = BOOT_SOURCE_SD_MMC;
break;
case RCW_SRC_I2C1_VAL:
/* RCW SRC I2C1 Extended */
#endif
#ifdef CONFIG_TFABOOT
-#define MAX_BOOTCMD_SIZE 256
+#define MAX_BOOTCMD_SIZE 512
int fsl_setenv_bootcmd(void)
{
fsl_setenv_bootcmd();
fsl_setenv_mcinitcmd();
}
+
+ /*
+ * If the boot mode is secure, default environment is not present then
+ * setenv command needs to be run by default
+ */
+#ifdef CONFIG_CHAIN_OF_TRUST
+ if ((fsl_check_boot_mode_secure() == 1)) {
+ fsl_setenv_bootcmd();
+ fsl_setenv_mcinitcmd();
+ }
+#endif
#endif
#ifdef CONFIG_QSPI_AHB_INIT
qspi_ahb_init();