summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJi Luo <ji.luo@nxp.com>2019-07-18 13:56:45 +0800
committerJi Luo <ji.luo@nxp.com>2019-07-19 13:14:15 +0800
commit2a43c3e702720fab67ae9af73634a958a1b62044 (patch)
tree0399901533ba4e194f3d89235496e04082da32cf /common
parent3f94cf98113af6c31e146afcf394f34ff4d2bc00 (diff)
MA-15158 Set spl recovery mode for dual bootloader
The A/B slot selection is moved to spl, it may lead to hang if no bootable slots found. The only way to recover the board is re-flash images with uuu tool, which is quite inconvenient for some customers who can't enter serial download mode. This patch will set "spl recovery mode" which will give us a chance to re-flash images with fastboot commands. Test: Enter spl recovery mode and flash images when no bootable slots found. Change-Id: I31278f5212bde7609fe2f49e77b3849e92c0c516 Signed-off-by: Ji Luo <ji.luo@nxp.com>
Diffstat (limited to 'common')
-rw-r--r--common/board_r.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/board_r.c b/common/board_r.c
index 9444bc17b8..5371832bd4 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -685,6 +685,15 @@ static int initr_tee_setup(void)
}
#endif
+#ifdef CONFIG_DUAL_BOOTLOADER
+extern void check_spl_recovery(void);
+static int initr_check_spl_recovery(void)
+{
+ check_spl_recovery();
+ return 0;
+}
+#endif
+
static int run_main_loop(void)
{
#ifdef CONFIG_SANDBOX
@@ -908,6 +917,9 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_FSL_FASTBOOT
initr_check_fastboot,
#endif
+#ifdef CONFIG_DUAL_BOOTLOADER
+ initr_check_spl_recovery,
+#endif
run_main_loop,
};