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>2020-05-15 17:34:31 +0800
commit3a3f02498a1f3f6c32aec76ced72891b9ad259a8 (patch)
tree488e727c5d00bd73a34215504281586ed19d6a51 /common
parent63ce0f52f30efa248365d21e1da5f82ee598da8b (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> (cherry picked from commit 46cc755cf3f42422ee1d7783394e14e8125df2b6)
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 96eb12c20e..8b8d490d6c 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -689,6 +689,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
@@ -914,6 +923,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,
};