1.loader修复升级fw包缺少时重新启动

This commit is contained in:
payton 2023-12-27 10:28:35 +08:00
parent 142b18a7e9
commit b5c509d678

View File

@ -2759,7 +2759,9 @@ _THUMB2 unsigned int bl_process_all_in_one(UINT32 uiFwBuf, UINT32 uiFwBufSize, D
bl_displayErrMsg("load fdt failed\r\n");
}
}
else if (er == -1){
return 0;
}
// update loader flag
bl_update_loader_flag(p_fdt, uiLoaderFunc);
if (uiLoaderFunc & FUNC_UPDATE_FW) {
@ -3501,6 +3503,12 @@ _THUMB2 UINT32 bl_mainFlow(void)
bl_displayErrMsg("cannot process all-in-one fw");
#else
uiFwBaseAddr = bl_process_all_in_one(uiUpdateMainBinBufAddr, uiUpdateFileLen, &p_dram_partition, uiLoaderFunc, &comp_addr, &comp_size);
if(uiFwBaseAddr == 0){
debug_err("bl_process_all_in_one failed, boot from flash\n");
uiLoaderFunc &= ~(FUNC_RUN_CARD | FUNC_UPDATE_FW);
uiLoaderFunc |= FUNC_RUN_FLASH;
goto BOOT_FROM_FLASH;
}
#endif
} else {
// non-all-in-one flow
@ -3571,6 +3579,7 @@ _THUMB2 UINT32 bl_mainFlow(void)
}
#else
BOOT_FROM_FLASH:
uiFwBaseAddr = bl_process_flash_boot((UINT8 *)SDRAM_Start_FW, &p_dram_partition, uiLoaderFunc, &comp_addr, &comp_size);
if (comp_addr == 0) {
uiUpdateMainBinBufAddr = uiFwBaseAddr;