hikey: Add option to support 8GB eMMC (default)

flash-all.sh /dev/ttyUSBX [4g]

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/installer/README b/installer/README
index 73fbb45..b58cd96 100644
--- a/installer/README
+++ b/installer/README
@@ -33,6 +33,6 @@
 
 Run the flash-all.sh script after building AOSP for hikey with the right
 right UART recognised in the above command:
-$ ./flash-all.sh /dev/ttyUSBX
+$ ./flash-all.sh /dev/ttyUSBX [4g]
 
 Remove the link 3-4 and power on the board.
diff --git a/installer/flash-all.sh b/installer/flash-all.sh
index 4860c45..ae54514 100755
--- a/installer/flash-all.sh
+++ b/installer/flash-all.sh
@@ -11,10 +11,19 @@
     exit
 fi
 
+PTABLE=ptable-aosp-8g.img
+if [ $# -gt 1 ]
+  then
+    if [ $2 == '4g' ]
+      then
+        PTABLE=ptable-aosp-4g.img
+    fi
+fi
+
 INSTALLER_DIR="`dirname $0`"
 ANDROID_TOP=${INSTALLER_DIR}/../../../../
 python ${INSTALLER_DIR}/hisi-idt.py --img1=${INSTALLER_DIR}/l-loader.bin -d ${1}
-fastboot flash ptable ${INSTALLER_DIR}/ptable-aosp.img
+fastboot flash ptable ${INSTALLER_DIR}/${PTABLE}
 fastboot flash fastboot ${INSTALLER_DIR}/fip.bin
 fastboot flash nvme ${INSTALLER_DIR}/nvme.img
 fastboot flash boot ${ANDROID_TOP}/out/target/product/hikey/boot_fat.uefi.img
diff --git a/installer/ptable-aosp.img b/installer/ptable-aosp-4g.img
similarity index 100%
rename from installer/ptable-aosp.img
rename to installer/ptable-aosp-4g.img
Binary files differ
diff --git a/installer/ptable-aosp-8g.img b/installer/ptable-aosp-8g.img
new file mode 100644
index 0000000..ab77618
--- /dev/null
+++ b/installer/ptable-aosp-8g.img
Binary files differ