[Feature]add MT2731_MP2_MR2_SVN388 baseline version

Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/meta/meta-mediatek-mt2731/recipes-devtools/flashtool/files/auto2731evb-ivt-vp1/flashproc.py b/meta/meta-mediatek-mt2731/recipes-devtools/flashtool/files/auto2731evb-ivt-vp1/flashproc.py
new file mode 100644
index 0000000..c58be5c
--- /dev/null
+++ b/meta/meta-mediatek-mt2731/recipes-devtools/flashtool/files/auto2731evb-ivt-vp1/flashproc.py
@@ -0,0 +1,146 @@
+#!/usr/bin/python
+import os
+
+procedures = {
+    # product   : fastboot args
+    'DEFAULT': [['fbWait'],
+                ['fastboot', 'flash', 'EMPTY', 'bl2.img'],
+                ['fastboot', 'continue'],
+                ['fbWait'],
+                ['fastboot', 'flash', 'download:tz', 'tee.img'],
+                ['fastboot', 'flash', 'download:bl33', 'bl33.img'],
+                ['fastboot', 'flash', 'download:spmfw', 'spmfw.img'],
+                ['fastboot', 'oem', 'continue'],
+                ['fbWait'],
+                ['fastboot', 'erase', 'mmc0'],
+                ['fastboot', 'erase', 'mmc0boot0'],
+                ['fastboot', 'erase', 'nand0'],
+                ['fastboot', 'flash', 'nand0', 'MBR_NAND'],
+                ['fastboot', 'flash', 'mmc0', 'MBR_EMMC'],
+                ['fastboot', 'flash', 'bl2', 'bl2.img'],
+                ['fastboot', 'flash', 'bl33', 'bl33.img'],
+                ['fastboot', 'flash', 'spm', 'spmfw.img'],
+                ['fastboot', 'flash', 'boot_a', 'boot.img'],
+                ['fastboot', 'flash', 'boot_b', 'boot.img'],
+                ['fastboot', 'flash', 'dtbo', 'combo.dtbo'],
+                ['fastboot', 'flash', 'tee_a', 'tee.img'],
+                ['fastboot', 'flash', 'tee_b', 'tee.img'],
+                ['fastboot', 'flash', 'md1img_a', 'md1img.img'],
+                ['fastboot', 'flash', 'md1img_b', 'md1img.img'],
+                ['fastboot', 'flash', 'sncfg', 'sncfg.ubi'],
+                ['fastboot', 'flash', 'system_a', 'system.img'],
+                ['fastboot', 'flash', 'system_b', 'system.img'],
+                ['fastboot', 'flash', 'userdata', 'userdata.img'],
+                ['fastboot', 'flash', 'vbmeta_a', 'vbmeta.img'],
+                ['fastboot', 'flash', 'vbmeta_b', 'vbmeta.img'],
+                ['fastboot', 'flash', 'hsm_os', 'hsm_os.img']]
+}
+
+userprocedures = {
+    # product   : fastboot args
+    'DEFAULT': [['fbWait'],
+                ['fastboot', 'flash', 'EMPTY', 'bl2.img'],
+                ['fastboot', 'continue'],
+                ['fbWait'],
+                ['fastboot', 'flash', 'download:tz', 'tee.img'],
+                ['fastboot', 'flash', 'download:bl33', 'bl33.img'],
+                ['fastboot', 'flash', 'download:spmfw', 'spmfw.img'],
+                ['fbWait'],
+                ['fastboot', 'erase', 'system'],
+                ['fastboot', 'flash', 'system', 'system.img'],
+                ['fastboot', 'oem', 'set_active', '0']]
+}
+
+bootprocedures = {
+    # product   : fastboot args
+    'DEFAULT': [['fbWait'],
+                ['fastboot', 'flash', 'EMPTY', 'bl2.img'],
+                ['fastboot', 'continue'],
+                ['fbWait'],
+                ['fastboot', 'flash', 'download:tz', 'tee.img'],
+                ['fastboot', 'flash', 'download:bl33', 'bl33.img'],
+                ['fastboot', 'flash', 'download:spmfw', 'spmfw.img'],
+                ['fastboot', 'flash', 'bl2', 'bl2.img'],
+                ['fastboot', 'flash', 'tee_a', 'tee.img'],
+                ['fastboot', 'flash', 'bl33', 'bl33.img'],
+                ['fastboot', 'flash', 'spm', 'spmfw.img'],
+                ['fastboot', 'flash', 'boot', 'boot.img'],
+                ['fastboot', 'oem', 'set_active', '0']]
+}
+
+testprocedures = {
+    # product   : fastboot args
+    'DEFAULT': [['fbWait'],
+                ['fastboot', 'flash', 'EMPTY', 'bl2.img'],
+                ['fastboot', 'continue'],
+                ['fbWait'],
+                ['fastboot', 'flash', 'download:tz', 'tee.img'],
+                ['fastboot', 'flash', 'download:bl33', 'bl33.img'],
+                ['fastboot', 'flash', 'download:spmfw', 'spmfw.img'],
+                ['fastboot', 'oem', 'continue'],
+                ['fbWait'],
+                ['fastboot', 'erase', 'bl2'],
+                ['fastboot', 'flash', 'bl2', 'bl2.img'],
+                ['fastboot', 'erase', 'bl33'],
+                ['fastboot', 'flash', 'bl33', 'bl33.img'],
+                ['fastboot', 'erase', 'spm'],
+                ['fastboot', 'flash', 'spm', 'spmfw.img'],
+                ['fastboot', 'erase', 'boot_a'],
+                ['fastboot', 'flash', 'boot_a', 'boot.img'],
+                ['fastboot', 'erase', 'boot_b'],
+                ['fastboot', 'flash', 'boot_b', 'boot.img'],
+                ['fastboot', 'erase', 'dtbo'],
+                ['fastboot', 'flash', 'dtbo', 'combo.dtbo'],
+                ['fastboot', 'erase', 'tee_a'],
+                ['fastboot', 'flash', 'tee_a', 'tee.img'],
+                ['fastboot', 'erase', 'tee_b'],
+                ['fastboot', 'flash', 'tee_b', 'tee.img'],
+                ['fastboot', 'erase', 'md1img_a'],
+                ['fastboot', 'flash', 'md1img_a', 'md1img.img'],
+                ['fastboot', 'erase', 'md1img_b'],
+                ['fastboot', 'flash', 'md1img_b', 'md1img.img'],
+                ['fastboot', 'erase', 'system_a'],
+                ['fastboot', 'flash', 'system_a', 'system.img'],
+                ['fastboot', 'erase', 'system_b'],
+                ['fastboot', 'flash', 'system_b', 'system.img'],
+                ['fastboot', 'erase', 'userdata'],
+                ['fastboot', 'flash', 'userdata', 'userdata.ubi'],
+                ['fastboot', 'erase', 'vbmeta_a'],
+                ['fastboot', 'flash', 'vbmeta_a', 'vbmeta.img'],
+                ['fastboot', 'erase', 'vbmeta_b'],
+                ['fastboot', 'flash', 'vbmeta_b', 'vbmeta.img']]
+}
+
+# return procedure list
+
+
+def getFlashProc(product):
+    try:
+        ret = procedures[product.upper()]
+        return ret
+    except:
+        return None
+
+
+def getFlashUserProc(product):
+    try:
+        ret = userprocedures[product.upper()]
+        return ret
+    except:
+        return None
+
+
+def getFlashBootProc(product):
+    try:
+        ret = bootprocedures[product.upper()]
+        return ret
+    except:
+        return None
+
+
+def getFlashTestProc(product):
+    try:
+        ret = testprocedures[product.upper()]
+        return ret
+    except:
+        return None