From 596b7a8176c50181e3bf18876e90d585bccc7fbe Mon Sep 17 00:00:00 2001
From: zhang sanshan <b51434@freescale.com>
Date: Tue, 24 May 2016 16:19:07 +0800
Subject: [PATCH] MA-8202 [Android_MX6DL_ARD] Fastboot: Failed to boot system
 if update android_root.img based on NAND boot. 100%

For sparse system.img, USB can trasfer system.img through spliting image into two sparse images.
For android_root.img, the second part will overwrite the first one.
It is a workaround to enlarge CONFIG_USB_FASTBOOT_BUF_SIZE to hold system image whose size is more than 400M.

Signed-off-by: zhang sanshan <b51434@freescale.com>
---
 include/configs/mx6sabreandroid_common.h | 5 ++++-
 include/configs/mx6slevkandroid.h        | 5 ++++-
 include/configs/mx6sxsabreautoandroid.h  | 5 ++++-
 include/configs/mx6sxsabresdandroid.h    | 5 ++++-
 include/configs/mx7dsabresdandroid.h     | 5 ++++-
 5 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/include/configs/mx6sabreandroid_common.h b/include/configs/mx6sabreandroid_common.h
index ae23923b90..02d3bf81fd 100644
--- a/include/configs/mx6sabreandroid_common.h
+++ b/include/configs/mx6sabreandroid_common.h
@@ -63,6 +63,9 @@
 	"initrd_high=0xffffffff\0" \
 
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
+#ifdef CONFIG_FASTBOOT_STORAGE_NAND
+#define CONFIG_USB_FASTBOOT_BUF_SIZE   0x25000000
+#else
 #define CONFIG_USB_FASTBOOT_BUF_SIZE   0x19000000
-
+#endif
 #endif /* MX6_SABRE_ANDROID_COMMON_H */
diff --git a/include/configs/mx6slevkandroid.h b/include/configs/mx6slevkandroid.h
index 1eaf78a4da..1f2f0e55d1 100644
--- a/include/configs/mx6slevkandroid.h
+++ b/include/configs/mx6slevkandroid.h
@@ -71,6 +71,9 @@
 	"initrd_high=0xffffffff\0" \
 
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
+#ifdef CONFIG_FASTBOOT_STORAGE_NAND
+#define CONFIG_USB_FASTBOOT_BUF_SIZE   0x25000000
+#else
 #define CONFIG_USB_FASTBOOT_BUF_SIZE   0x19000000
-
+#endif
 #endif
diff --git a/include/configs/mx6sxsabreautoandroid.h b/include/configs/mx6sxsabreautoandroid.h
index 7cebe49d9f..a03512bd8a 100644
--- a/include/configs/mx6sxsabreautoandroid.h
+++ b/include/configs/mx6sxsabreautoandroid.h
@@ -62,6 +62,9 @@
 	"initrd_high=0xffffffff\0" \
 
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
+#ifdef CONFIG_FASTBOOT_STORAGE_NAND
+#define CONFIG_USB_FASTBOOT_BUF_SIZE   0x25000000
+#else
 #define CONFIG_USB_FASTBOOT_BUF_SIZE   0x19000000
-
+#endif
 #endif
diff --git a/include/configs/mx6sxsabresdandroid.h b/include/configs/mx6sxsabresdandroid.h
index 7d8c64e56f..41f1297e97 100644
--- a/include/configs/mx6sxsabresdandroid.h
+++ b/include/configs/mx6sxsabresdandroid.h
@@ -54,7 +54,10 @@
 	"initrd_high=0xffffffff\0" \
 
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
+#ifdef CONFIG_FASTBOOT_STORAGE_NAND
+#define CONFIG_USB_FASTBOOT_BUF_SIZE   0x25000000
+#else
 #define CONFIG_USB_FASTBOOT_BUF_SIZE   0x19000000
-
+#endif
 
 #endif
diff --git a/include/configs/mx7dsabresdandroid.h b/include/configs/mx7dsabresdandroid.h
index c8518a68dd..74112d8d6e 100644
--- a/include/configs/mx7dsabresdandroid.h
+++ b/include/configs/mx7dsabresdandroid.h
@@ -54,7 +54,10 @@
 
 
 #define CONFIG_USB_FASTBOOT_BUF_ADDR   CONFIG_SYS_LOAD_ADDR
+#ifdef CONFIG_FASTBOOT_STORAGE_NAND
+#define CONFIG_USB_FASTBOOT_BUF_SIZE   0x25000000
+#else
 #define CONFIG_USB_FASTBOOT_BUF_SIZE   0x19000000
-
+#endif
 
 #endif
-- 
GitLab