author | Xindong Xu <xindong.xu@amlogic.com> | 2019-12-02 02:31:32 (GMT) |
---|---|---|
committer | Xindong Xu <xindong.xu@amlogic.com> | 2019-12-02 08:00:57 (GMT) |
commit | 05c8bdef22dfb67eb39ba85bc16e38a8a67d6cf7 (patch) | |
tree | 2dd1796e9a926ee0b730655abc7baeef34339ec6 | |
parent | 9a0f4cb088f8e537a5f6e135ca6ce29da3be15a4 (diff) | |
download | uboot-05c8bdef22dfb67eb39ba85bc16e38a8a67d6cf7.zip uboot-05c8bdef22dfb67eb39ba85bc16e38a8a67d6cf7.tar.gz uboot-05c8bdef22dfb67eb39ba85bc16e38a8a67d6cf7.tar.bz2 |
fastboot: fix ab update fastboot flashall error [1/1]
PD#SWPL-17600
Problem:
fastboot flashall error when ab update
slot_suffix do not pass to fastbootd mode
Solution:
pass androidboot.slot_suffix to fastbootd mode
Verify:
franklin,newton,dalton,marconi,ampere
Change-Id: I2f9758d9a445ca9e188d4eec32dac6803f946755
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
-rw-r--r-- | common/cmd_bcb.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/cmd_bcb.c b/common/cmd_bcb.c index 25a2c37..ed8616f 100644 --- a/common/cmd_bcb.c +++ b/common/cmd_bcb.c @@ -92,6 +92,7 @@ static int do_RunBcbCommand( char miscbuf[MISCBUF_SIZE] = {0}; char clearbuf[COMMANDBUF_SIZE+STATUSBUF_SIZE+RECOVERYBUF_SIZE] = {0}; char* RebootMode; + char* ActiveSlot; if (argc != 2) { return cmd_usage(cmdtp); @@ -173,6 +174,15 @@ static int do_RunBcbCommand( run_command("setenv bootargs ${bootargs} androidboot.quiescent=1;", 0); } + run_command("get_valid_slot", 0); + if (getenv("active_slot")) { + ActiveSlot = getenv("active_slot"); + if (strstr(ActiveSlot, "normal") == NULL) { + printf("ab update mode\n"); + run_command("setenv bootargs ${bootargs} androidboot.slot_suffix=${active_slot};", 0); + } + } + if (!memcmp(command, CMD_RUN_RECOVERY, strlen(CMD_RUN_RECOVERY))) { if (run_command("run recovery_from_flash", 0) < 0) { printf("run_command for cmd:run recovery_from_flash failed.\n"); |