avb: do not use lastboot if enable CONFIG_ANDROID_AVB

The avb process have verify next level firmware to ensure its
availability. So there is no need to support lastboot in avb
process.

Change-Id: I1623a2bd93c54802ce0067cad7061ade6cc56313
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
Jason Zhu 2019-06-27 18:00:11 +08:00
parent 5adc7ded88
commit 3120d9d50e
2 changed files with 5 additions and 1 deletions

View File

@ -1043,12 +1043,14 @@ int android_bootloader_boot_flow(struct blk_desc *dev_desc,
} }
if (slot_suffix[0] != '_') { if (slot_suffix[0] != '_') {
#ifndef CONFIG_ANDROID_AVB
printf("###There is no bootable slot, bring up lastboot!###\n"); printf("###There is no bootable slot, bring up lastboot!###\n");
if (rk_get_lastboot() == 1) if (rk_get_lastboot() == 1)
memcpy(slot_suffix, "_b", 2); memcpy(slot_suffix, "_b", 2);
else if(rk_get_lastboot() == 0) else if(rk_get_lastboot() == 0)
memcpy(slot_suffix, "_a", 2); memcpy(slot_suffix, "_a", 2);
else else
#endif
return -1; return -1;
} }
#endif #endif

View File

@ -154,12 +154,14 @@ int rk_avb_get_current_slot(char *select_slot)
} }
if (rk_avb_ab_slot_select(ops->ab_ops, select_slot) != 0) { if (rk_avb_ab_slot_select(ops->ab_ops, select_slot) != 0) {
#ifndef CONFIG_ANDROID_AVB
printf("###There is no bootable slot, bring up last_boot!###\n"); printf("###There is no bootable slot, bring up last_boot!###\n");
if (rk_get_lastboot() == 1) if (rk_get_lastboot() == 1)
memcpy(select_slot, "_b", 2); memcpy(select_slot, "_b", 2);
else if(rk_get_lastboot() == 0) else if(rk_get_lastboot() == 0)
memcpy(select_slot, "_a", 2); memcpy(select_slot, "_a", 2);
else else
#endif
return -1; return -1;
ret = 0; ret = 0;
} }