stable: update script for support s6 [1/1]

PD#SWPL-177211

Problem:
update script for support s6

Solution:
fixed

Verify:
local

Change-Id: I445e9f25b0d3174cee123a047161446ef89e1516
Signed-off-by: wenbo.wang <wenbo.wang@amlogic.com>
diff --git a/git_commits_2_src_link.py b/git_commits_2_src_link.py
index bfcbcc7..94e296b 100755
--- a/git_commits_2_src_link.py
+++ b/git_commits_2_src_link.py
@@ -50,10 +50,11 @@
    {"blType" : "bl2_sc2",                  "gitBranch" : "projects/sc2",                "stbBranch" : "projects/openlinux/bl-sc2-3.5.0",        "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/core/+/"},
     {"blType" : "bl2_s4",                   "gitBranch" : "projects/s4",                "stbBranch" : "projects/openlinux/bl-s4-3.5.0",         "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/core/+/"},
     {"blType" : "bl2_s5",                   "gitBranch" : "projects/s5",                "stbBranch" : "projects/openlinux/bl-s5-3.5.0",         "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/core/+/"},
-    {"blType" : "bl2_t7",                   "gitBranch" : "projects/t7",                "stbBranch" : "projects/openlinux/bl-s7-3.5.0",         "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/core/+/"},
-    {"blType" : "bl2_s7",                   "gitBranch" : "projects/s7",                "stbBranch" : "projects/openlinux/bl-s7d-3.5.0",        "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/core/+/"},
-    {"blType" : "bl2_s7d",                  "gitBranch" : "projects/s7d",               "stbBranch" : "projects/openlinux/bl-t7-3.5.0",         "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/core/+/"},
-    {"blType" : "ddr",                      "gitBranch" : "amlogic-ddr-core",           "stbBranch" : "projects/openlinux/bl-3.5.0",           "gitRemote" : "firmware",         "upStream" : "bl2/src/ddr/+/"},
+    {"blType" : "bl2_t7",                   "gitBranch" : "projects/t7",                "stbBranch" : "projects/openlinux/bl-t7-3.5.0",         "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/core/+/"},
+    {"blType" : "bl2_s7",                   "gitBranch" : "projects/s7",                "stbBranch" : "projects/openlinux/bl-s7-3.5.0",         "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/core/+/"},
+    {"blType" : "bl2_s7d",                  "gitBranch" : "projects/s7d",               "stbBranch" : "projects/openlinux/bl-s7d-3.5.0",        "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/core/+/"},
+    {"blType" : "bl2_s6",                   "gitBranch" : "projects/s6",                "stbBranch" : "projects/openlinux/bl-s6-3.5.0",          "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/core/+/"},
+    {"blType" : "ddr",                      "gitBranch" : "amlogic-ddr-core",           "stbBranch" : "projects/openlinux/bl-3.5.0",            "gitRemote" : "firmware",         "upStream" : "bl2/src/ddr/+/"},
     {"blType" : "bl2_ree",                  "gitBranch" : "projects/amlogic-dev",       "stbBranch" : "projects/openlinux/bl-3.5.0",            "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/ree/+/"},
     {"blType" : "bl2_tee",                  "gitBranch" : "projects/amlogic-dev",       "stbBranch" : "projects/openlinux/bl-3.5.0",            "gitRemote" : "firmware",         "upStream" : "bootloader/amlogic-advanced-bootloader/tee/+/"},
     {"blType" : "bl30_aocpu",               "gitBranch" : "projects/amlogic-dev",       "stbBranch" : "projects/openlinux/bl-3.5.0",            "gitRemote" : "firmware",         "upStream" : "firmware/aocpu/+/"},
diff --git a/stable_sub_version_tools.sh b/stable_sub_version_tools.sh
index a09a7a7..b5d5161 100755
--- a/stable_sub_version_tools.sh
+++ b/stable_sub_version_tools.sh
@@ -53,11 +53,12 @@
 BL2_T7_BRANCH="projects/openlinux/bl-t7-${STABLE_MAJOR_VERSION}"
 BL2_S7_BRANCH="projects/openlinux/bl-s7-${STABLE_MAJOR_VERSION}"
 BL2_S7D_BRANCH="projects/openlinux/bl-s7d-${STABLE_MAJOR_VERSION}"
+BL2_S6_BRANCH="projects/openlinux/bl-s6-${STABLE_MAJOR_VERSION}"
 
 # push uboot.bin to android dir
-declare -a OPENLINUX_BOARD_TYPE=("ohm" "oppen" "tyson" "t7_an400" "qurra" "ross")
-declare -a OPENLINUX_BOARD_BRANCH=("${BL2_SC2_BRANCH}" "${BL2_S4_BRANCH}" "${BL2_S5_BRANCH}" "${BL2_T7_BRANCH}" "${BL2_S7_BRANCH}" "${BL2_S7D_BRANCH}")
-declare -a OPENLINUX_BOARD_CONFIG=("sc2_ah212" "s4_ap222" "s5_ax201" "t7_an400_lpddr4x" "s7_bh201" "s7d_bm201")
+declare -a OPENLINUX_BOARD_TYPE=("ohm" "oppen" "tyson" "t7_an400" "qurra" "ross" "raman")
+declare -a OPENLINUX_BOARD_BRANCH=("${BL2_SC2_BRANCH}" "${BL2_S4_BRANCH}" "${BL2_S5_BRANCH}" "${BL2_T7_BRANCH}" "${BL2_S7_BRANCH}" "${BL2_S7D_BRANCH}" "${BL2_S6_BRANCH}")
+declare -a OPENLINUX_BOARD_CONFIG=("sc2_ah212" "s4_ap222" "s5_ax201" "t7_an400_lpddr4x" "s7_bh201" "s7d_bm201" "s6_bl201")
 ANDROID_DEV_DIR="device/amlogic"
 ANDROID_DIR_OHM="${ANDROID_ROOT_DIR}/${ANDROID_DEV_DIR}/${OPENLINUX_BOARD_TYPE[0]}"
 ANDROID_DIR_OPPEN="${ANDROID_ROOT_DIR}/${ANDROID_DEV_DIR}/${OPENLINUX_BOARD_TYPE[1]}"
@@ -65,8 +66,9 @@
 ANDROID_DIR_T7="${ANDROID_ROOT_DIR}/${ANDROID_DEV_DIR}/${OPENLINUX_BOARD_TYPE[3]}"
 ANDROID_DIR_QURRA="${ANDROID_ROOT_DIR}/${ANDROID_DEV_DIR}/${OPENLINUX_BOARD_TYPE[4]}"
 ANDROID_DIR_ROSS="${ANDROID_ROOT_DIR}/${ANDROID_DEV_DIR}/${OPENLINUX_BOARD_TYPE[5]}"
+ANDROID_DIR_RAMAN="${ANDROID_ROOT_DIR}/${ANDROID_DEV_DIR}/${OPENLINUX_BOARD_TYPE[6]}"
 
-declare -a ANDROID_DIR_LIST=("${ANDROID_DIR_OHM}" "${ANDROID_DIR_OPPEN}" "${ANDROID_DIR_TYSON}" "${ANDROID_DIR_T7}" "${ANDROID_DIR_QURRA}" "${ANDROID_DIR_ROSS}")
+declare -a ANDROID_DIR_LIST=("${ANDROID_DIR_OHM}" "${ANDROID_DIR_OPPEN}" "${ANDROID_DIR_TYSON}" "${ANDROID_DIR_T7}" "${ANDROID_DIR_QURRA}" "${ANDROID_DIR_ROSS}" "${ANDROID_DIR_RAMAN}")
 
 #
 # Array
@@ -403,6 +405,13 @@
 				STABLE_VER_EXT="bl-${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
 				echo "# bl2-s7d     : 	${STABLE_VER_EXT}"
 
+				git checkout ${BL2_S6_BRANCH} > /dev/null 2>&1
+				VER_MAJOR=`grep 'MAJOR_VERSION ' ./${STABLE_VER_FILE[0]} |grep '=' |awk '{print $3}'`
+				VER_MINOR=`grep 'MINOR_VERSION ' ./${STABLE_VER_FILE[0]} |grep '=' |awk '{print $3}'`
+				VER_PATCH=`grep 'PATCH_VERSION ' ./${STABLE_VER_FILE[0]} |grep '=' |awk '{print $3}'`
+				STABLE_VER_EXT="bl-${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
+				echo "# bl2-s6     : 	${STABLE_VER_EXT}"
+
 				git checkout ${BLX_STABLE_BRANCH[0]} > /dev/null 2>&1
 			fi
 		fi
@@ -550,6 +559,15 @@
 					git push review HEAD:refs/for/${BL2_S7D_BRANCH}%topic=${PUSH_TOPIC_COMMON}-bl2-s7d
 					git checkout ${BLX_STABLE_BRANCH[$i]} > /dev/null
 					echo ""
+
+					echo ""
+					echo "PUSH bl2-s6 ==>>"
+					BL2_SC2_LAST_COMMIT=`git log --pretty=format:"%h" | head -1  | awk '{print $1}'`
+					git checkout ${BL2_S6_BRANCH} > /dev/null
+					git cherry-pick ${BL2_SC2_LAST_COMMIT}
+					git push review HEAD:refs/for/${BL2_S6_BRANCH}%topic=${PUSH_TOPIC_COMMON}-bl2-s7d
+					git checkout ${BLX_STABLE_BRANCH[$i]} > /dev/null
+					echo ""
 				fi
 			fi
 		fi
@@ -599,6 +617,9 @@
 					git checkout ${BL2_S7D_BRANCH} > /dev/null 2>&1
 					echo "[--] ${BLX_NAME[$i]}: [`git branch --show-current`]  `git log --abbrev=8 --oneline -1 `"
 
+					git checkout ${BL2_S6_BRANCH} > /dev/null 2>&1
+					echo "[--] ${BLX_NAME[$i]}: [`git branch --show-current`]  `git log --abbrev=8 --oneline -1 `"
+
 					git checkout ${BLX_STABLE_BRANCH[0]} > /dev/null 2>&1
 				fi
 			fi