summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodewalker <codewalker@hardkernel.com>2017-08-16 06:36:49 +0300
committercodewalker <codewalker@hardkernel.com>2017-08-16 12:07:25 +0300
commit03deb5becd8537240c44efab8ab148b38d5185ff (patch)
tree684538bb2f4e79f684f73c266613e763f46fdf12
parentdda59694901e05acbeeb4c254353efb458fb5e1d (diff)
downloadu-boot-03deb5becd8537240c44efab8ab148b38d5185ff.tar.xz
ODROID-X4: Fix to order update sequence.
Change-Id: I986151dd9456808d1cca86bcea240f9950cc15d8
-rwxr-xr-xboard/samsung/common/odroid_misc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/board/samsung/common/odroid_misc.c b/board/samsung/common/odroid_misc.c
index c9f5fc9e72..37ba0acbaf 100755
--- a/board/samsung/common/odroid_misc.c
+++ b/board/samsung/common/odroid_misc.c
@@ -504,9 +504,7 @@ static void odroid_fw_update(unsigned int option)
"cache", upload_addr, &upinfo[PART_CACHE], false);
if (option & OPTION_ERASE_USERDATA) {
- if (option & OPTION_FILELOAD_EXT4) {
- run_command("fatformat mmc 0:3", 0);
- } else if ((option & OPTION_RESIZE_PART) == 0) {
+ if ((option & OPTION_RESIZE_PART) == 0) {
upload_addr = upload_file("userdata.img",
"userdata", upload_addr, &upinfo[PART_USERDATA], false);
}
@@ -557,6 +555,10 @@ static void odroid_fw_update(unsigned int option)
else if (option & OPTION_OLDTYPE_PART)
run_command("fdisk -c 0", 0);
+ if (option & OPTION_ERASE_USERDATA)
+ if (option & OPTION_FILELOAD_EXT4)
+ run_command("fatformat mmc 0:3", 0);
+
for (i = 0; i < PART_MAX; i++)
upload_data_write(&upinfo[i], i > PART_KERNEL ? 0 : 1);