Skip to content

Commit

Permalink
rockchip: common: enter fastboot when avb+ab system boot failed
Browse files Browse the repository at this point in the history
When avb+ab system boot failed, it means slot a/b is unbootable
and slot_cnt_a/b is zero. We should update images a/b and
active slot again, and this can be done by fastboot. Remove
rockusb from RKIMG_BOOTCOMMAND since rockusb unable to active slot.

Change-Id: Ib9b15940a5b8f0cefe9a91ee7564ea8f9aa6f201
Signed-off-by: Zain Wang <wzz@rock-chips.com>
  • Loading branch information
zainwangrockchips authored and JosephChen2017 committed Jul 11, 2019
1 parent f3d6024 commit 375a256
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/configs/rockchip-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,24 @@
"fi; \0"

#ifdef CONFIG_AVB_VBMETA_PUBLIC_KEY_VALIDATE
#ifndef CONFIG_ANDROID_AB
#define RKIMG_BOOTCOMMAND \
"boot_android ${devtype} ${devnum};" \
"echo AVB boot failed and enter rockusb or fastboot!;" \
"rockusb 0 ${devtype} ${devnum};" \
"fastboot usb 0;"
#else
/*
* Update images a/b and active slot with fastboot
* when avb+ab system boot failed.
* Remove rockusb since it unable to active slot.
*/
#define RKIMG_BOOTCOMMAND \
"boot_android ${devtype} ${devnum};" \
"echo AVB boot failed and enter fastboot!;" \
"fastboot usb 0;"
#endif /* CONFIG_ANDROID_AB */
#else /* CONFIG_AVB_VBMETA_PUBLIC_KEY_VALIDATE */
#define RKIMG_BOOTCOMMAND \
"boot_android ${devtype} ${devnum};" \
"bootrkp;" \
Expand Down

0 comments on commit 375a256

Please sign in to comment.