cmd: bootfit: add slot info to bootargs

Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Change-Id: Iac5eb54568c03239183425ef8ac9c51f7d774cd6
This commit is contained in:
Jason Zhu 2020-10-23 14:17:29 +08:00
parent d2fb2f92b0
commit 656558394a
1 changed files with 8 additions and 0 deletions

View File

@ -95,6 +95,14 @@ static int do_boot_fit(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
printf("at %s with size 0x%08lx\n", fit_addr, size); printf("at %s with size 0x%08lx\n", fit_addr, size);
#ifdef CONFIG_ANDROID_AB #ifdef CONFIG_ANDROID_AB
char slot_suffix[3] = {0};
char slot_info[21] = "android_slotsufix=";
if (ab_get_slot_suffix(slot_suffix))
goto out;
strcat(slot_info, slot_suffix);
env_update("bootargs", slot_info);
ab_update_root_uuid(); ab_update_root_uuid();
if (ab_decrease_tries()) if (ab_decrease_tries())
printf("Decrease ab tries count fail!\n"); printf("Decrease ab tries count fail!\n");