[Feature][ZXW-25]add version in ap, boot, cap
Change-Id: I381aa18ef8a692dc302891151f2dd45e6cae0a8b
diff --git a/update_version.sh b/update_version.sh
new file mode 100644
index 0000000..dc5dbe3
--- /dev/null
+++ b/update_version.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+#export LYNQ_VERSION="T106_lynq_version_ap_build_sh"
+LYNQ_AP_VERSION="T106_ap_version"
+LYNQ_CAP_INSIDE_VERSION="cap_0425"
+LYNQ_CAP_VERSION="MR3.02b06.00"
+COMMIT_ID="$(git rev-parse HEAD)"
+
+LYNQ_SW_INSIDE_VERSION="LYNQ_CONFIG_VERSION = \"${LYNQ_AP_VERSION}_${LYNQ_CAP_INSIDE_VERSION}\""
+LYNQ_SW_VERSION="LYNQ_CONFIG_SW_VERSION = \"${LYNQ_AP_VERSION}_${LYNQ_CAP_VERSION}\""
+LYNQ_AP_SW_VERSION="export LYNQ_VERSION=\"${LYNQ_AP_VERSION}\""
+LYNQ_COMMITID="LYNQ_CONFIG_COMMITID = \"${COMMIT_ID}\""
+LYNQ_BOOT_COMMIT_ID="LYNQ_COMMIT_ID = \"${COMMIT_ID}\""
+eval sed -i 's/^.*LYNQ_CONFIG_VERSION.*$/"${LYNQ_SW_INSIDE_VERSION}"/' $(pwd)/cap/zx297520v3/sources/meta-zxic-custom/conf/lynq_base.conf
+eval sed -i 's/^.*LYNQ_CONFIG_SW_VERSION.*$/"${LYNQ_SW_VERSION}"/' $(pwd)/cap/zx297520v3/sources/meta-zxic-custom/conf/lynq_base.conf
+eval sed -i 's/^.*LYNQ_CONFIG_COMMITID.*$/"${LYNQ_COMMITID}"/' $(pwd)/cap/zx297520v3/sources/meta-zxic-custom/conf/lynq_base.conf
+eval sed -i 's/^.*LYNQ_VERSION.*$/"${LYNQ_AP_SW_VERSION}"/' $(pwd)/ap/build/build.sh
+eval sed -i 's/^.*LYNQ_CONFIG_VERSION[[:space:]]=.*$/"${LYNQ_SW_INSIDE_VERSION}"/' $(pwd)/boot/common/src/uboot/arch/arm/lib/Makefile
+eval sed -i 's/^.*LYNQ_CONFIG_COMMITID[[:space:]]=.*$/"${LYNQ_COMMITID}"/' $(pwd)/boot/common/src/uboot/arch/arm/lib/Makefile
+
+