diff options
author | Haoran Wang <Haoran.Wang@freescale.com> | 2016-07-25 11:56:23 +0800 |
---|---|---|
committer | Haoran Wang <Haoran.Wang@freescale.com> | 2016-07-25 14:22:50 +0800 |
commit | 84d9c08b2227cf0eb2a30266e4af32b6c85d1b7e (patch) | |
tree | 6ede5ba067e1a3b26d9482b8d7b5952bf2ae0015 | |
parent | f41d461405edd0a547d50860b2e74baa63c43615 (diff) | |
download | u-boot-imx-84d9c08b2227cf0eb2a30266e4af32b6c85d1b7e.zip u-boot-imx-84d9c08b2227cf0eb2a30266e4af32b6c85d1b7e.tar.gz u-boot-imx-84d9c08b2227cf0eb2a30266e4af32b6c85d1b7e.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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 98069d7..6f29075 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 @@ -2532,6 +2533,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."); @@ -2543,6 +2545,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; @@ -2553,6 +2556,7 @@ int do_fastboot_lock() { printf("Start /data wipe process....\n"); fastboot_wipe_data_partition(); + printf("Wipe /data completed.\n"); return status; |