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:
parent
5adc7ded88
commit
3120d9d50e
|
|
@ -1043,12 +1043,14 @@ int android_bootloader_boot_flow(struct blk_desc *dev_desc,
|
|||
}
|
||||
|
||||
if (slot_suffix[0] != '_') {
|
||||
#ifndef CONFIG_ANDROID_AVB
|
||||
printf("###There is no bootable slot, bring up lastboot!###\n");
|
||||
if (rk_get_lastboot() == 1)
|
||||
memcpy(slot_suffix, "_b", 2);
|
||||
else if(rk_get_lastboot() == 0)
|
||||
memcpy(slot_suffix, "_a", 2);
|
||||
else
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
#ifndef CONFIG_ANDROID_AVB
|
||||
printf("###There is no bootable slot, bring up last_boot!###\n");
|
||||
if (rk_get_lastboot() == 1)
|
||||
memcpy(select_slot, "_b", 2);
|
||||
else if(rk_get_lastboot() == 0)
|
||||
memcpy(select_slot, "_a", 2);
|
||||
else
|
||||
#endif
|
||||
return -1;
|
||||
ret = 0;
|
||||
}
|
||||
|
|
@ -793,4 +795,4 @@ int rk_avb_init_ab_metadata(void)
|
|||
avb_ops_user_free(ops);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue