author | Xindong Xu <xindong.xu@amlogic.com> | 2019-08-22 09:09:29 (GMT) |
---|---|---|
committer | Xindong Xu <xindong.xu@amlogic.com> | 2019-08-22 09:11:35 (GMT) |
commit | b095b9b23f40a0a5b004e03ff56a9dee7e438cba (patch) | |
tree | be325ea40c0bccf61396e6cf0558c1eef11559f8 | |
parent | f9da345cdd46ef7d2912e6901a34d26cada2fce1 (diff) | |
download | uboot-b095b9b23f40a0a5b004e03ff56a9dee7e438cba.zip uboot-b095b9b23f40a0a5b004e03ff56a9dee7e438cba.tar.gz uboot-b095b9b23f40a0a5b004e03ff56a9dee7e438cba.tar.bz2 |
fastboot: set is-userspace to no only when dynamic [1/1]
PD#SWPL-13124
Problem:
fastboot flash system is not ok when using
adb vesion 1.0.41 in P
Solution:
set is-userspace to no only when dynamic
because adb 1.0.41 will send fastboot getvar is-userspace first when run
fastboot flash xxx
If is-userspace return no, PC will reject to flash dynamic partitions
So return NULL when not enable dynamic partition
Verify:
franklin
Change-Id: Ic38e98257c128612ddce8dd035a773623900da45
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 041f82f..5d86e70 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -602,7 +602,12 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) } else if (!strcmp_l1("battery-voltage", cmd)) { strncat(response, "4", chars_left); } else if (!strcmp_l1("is-userspace", cmd)) { - strncat(response, "no", chars_left); + if (dynamic_partition) { + strncat(response, "no", chars_left); + } else { + error("unknown variable: %s\n", cmd); + strcpy(response, "FAILVariable not implemented"); + } } else if (!strcmp_l1("is-logical", cmd)) { strsep(&cmd, ":"); printf("partition is %s\n", cmd); |