From 08762032aac126483ce0505834032d1aee9781a1 Mon Sep 17 00:00:00 2001 From: Chen Guoyin Date: Wed, 23 Nov 2016 14:03:59 +0800 Subject: MA-9043 Append the real selected slot in bootargs_sec env Set the args androidboot.slot_suffix based on the real selected slot in unlock state Change-Id: I83e60a346d52e3fbba708f26595400df1af77383 Signed-off-by: Chen Guoyin --- drivers/usb/gadget/f_fastboot.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index b1a4dbb..4ab75d4 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -1945,7 +1945,9 @@ int do_boota(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf("boota: read boot image error\n"); goto fail; } - setenv("bootargs_sec", "androidboot.slot_suffix=_a"); + char bootargs_sec[ANDR_BOOT_ARGS_SIZE]; + sprintf(bootargs_sec, "androidboot.slot_suffix=%s", slot); + setenv("bootargs_sec", bootargs_sec); #ifdef CONFIG_FASTBOOT_LOCK } #endif -- cgit v1.1