fastboot: add oem command to init ab metadata

The command is: fastboot oem init-ab-metadata

Change-Id: I879929a8a6e1c133725267c94492b2f2495ba5b4
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
This commit is contained in:
Jason Zhu 2019-04-12 10:17:39 +08:00 committed by Jianhong Chen
parent 363411a1e6
commit 41386edd8d
1 changed files with 10 additions and 0 deletions

View File

@ -2126,6 +2126,16 @@ static void cb_oem(struct usb_ep *ep, struct usb_request *req)
fastboot_tx_write_str("OKAY");
#else
fastboot_tx_write_str("FAILnot implemented");
#endif
} else if (strncmp("init-ab-metadata", cmd + 4, 16) == 0) {
#ifdef CONFIG_RK_AVB_LIBAVB_USER
if (rk_avb_init_ab_metadata()) {
fastboot_tx_write_str("FAILinit ab data fail!");
return;
}
fastboot_tx_write_str("OKAY");
#else
fastboot_tx_write_str("FAILnot implemented");
#endif
} else {
fastboot_tx_write_str("FAILunknown oem command");