MA-15814 Check 'successful_boot' flag before marking unbootable
Slot will be marked as "unbootable" state if error happens during
image load/verify process, this may cause the board never boot up
if some random failures happen (like eMMC/DRAM access error at some
critical temperature).
Check the "successful_boot" flag before marking the slot as "unbootable",
this will help ease the "no bootable slot" issue.
Test: slot switch on imx8qm_mek.
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
6db8ebe2224ab6656e8e798288bd1b3c0472c0c0)
(cherry picked from commit
b64a9dcd87da333265c2ac4da2be8a735186b77e)
Change-Id: Ib060b11cc6687a3bacd09cecda7dd925beba6316