diff options
author | Ji Luo <ji.luo@nxp.com> | 2019-07-18 13:56:45 +0800 |
---|---|---|
committer | Ji Luo <ji.luo@nxp.com> | 2022-04-18 16:40:08 +0800 |
commit | d63fb59f6d4d92d7a24a9e69bb9e3ba9db20f57b (patch) | |
tree | b1294997c8663691f9d6aed37631997c102f586f /common | |
parent | b258d3f62c779f144551dc1a75554fb52052473a (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)
(cherry picked from commit 047f09ef2ef33657d76fd92d8f5599e00158cd6b)
(cherry picked from commit e96b68d22e89e4031d1117ab347f042577c5c8f1)
Diffstat (limited to 'common')
-rw-r--r-- | common/board_r.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/common/board_r.c b/common/board_r.c index 244c22dd6d5..72e171a8229 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -608,6 +608,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 @@ -837,6 +846,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, }; |