summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoran Wang <Haoran.Wang@freescale.com>2016-07-25 11:56:23 +0800
committerHaoran Wang <Haoran.Wang@freescale.com>2016-07-25 15:08:00 +0800
commitdf1930552e1846d63c9c5a6620a16e711aabf970 (patch)
tree76f33f5b770778c824db23bd717335a9f38a1fad
parentbeeab4a5ffadae3ebd2342de1767705ae80fffd0 (diff)
downloadu-boot-imx-df1930552e1846d63c9c5a6620a16e711aabf970.zip
u-boot-imx-df1930552e1846d63c9c5a6620a16e711aabf970.tar.gz
u-boot-imx-df1930552e1846d63c9c5a6620a16e711aabf970.tar.bz2
MA-8425 fastboot: return OKAY in fastboot erase
fastboot host end will erase the ext4 partition before flash them. This is enable into fastboot when it can get ext4 partition by "getvar partition-type". Because by default "fastboot erase" will get FAIL result so the "fastboot flash" process will be end by the failure. As "fastboot flash" will overwrite the partition so we don't need to erase partition. Return OKAY will let the "fastboot flash" continue. This patch also refined fastboot lock/unlock codes. Signed-off-by: Haoran Wang <Haoran.Wang@freescale.com>
-rw-r--r--drivers/usb/gadget/f_fastboot.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index fcd85e9..370e7a2 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -1023,6 +1023,7 @@ static int rx_process_erase(const char *cmdbuf, char *response)
return 0;
#else
printf("Not support erase command for EMMC\n");
+ sprintf(response, "OKAY");
return -1;
#endif
@@ -2507,6 +2508,7 @@ int do_fastboot_unlock() {
printf("Start /data wipe process....\n");
fastboot_wipe_data_partition();
+ printf("Wipe /data completed.\n");
} else {
printf("It is not able to unlock device.");
@@ -2518,6 +2520,7 @@ int do_fastboot_unlock() {
int do_fastboot_lock() {
int status;
+ status = fastboot_get_lock_stat();
if (status == FASTBOOT_LOCK) {
printf("The device is already locked\n");
return 1;
@@ -2528,6 +2531,7 @@ int do_fastboot_lock() {
printf("Start /data wipe process....\n");
fastboot_wipe_data_partition();
+ printf("Wipe /data completed.\n");
return status;