summaryrefslogtreecommitdiff
path: root/util/getversion.sh
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2018-04-30 13:46:29 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-05-01 13:06:50 -0700
commit38889d08196b6e84062f9577c3c191de5082b68e (patch)
tree36fb423b536a6c807be857f9b2ce0851cc87a613 /util/getversion.sh
parentec74ffb91f20f271bf28442c22c13c602cf02492 (diff)
downloadchrome-ec-38889d08196b6e84062f9577c3c191de5082b68e.tar.gz
ectool: Don't use board name in ectool tool version
When using unified images, it might be confusing to have a single board name in the tool version. Since tool version was added to check for compatibility, it is sufficient to look at the sha versions without the actual board name. BUG=None BRANCH=None TEST=Verified that "ectool version" does not report board name in tool version. Change-Id: I862956791706f8a8d508b780bf050caee7c7ccd2 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1036114 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util/getversion.sh')
-rwxr-xr-xutil/getversion.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/getversion.sh b/util/getversion.sh
index 660ca24baf..1d00080e58 100755
--- a/util/getversion.sh
+++ b/util/getversion.sh
@@ -78,6 +78,7 @@ get_tree_version() {
IFS="${dc}"
ver="${CR50_DEV:+DBG/}${BOARD}_"
+tool_ver=""
global_dirty= # set if any of the component repos is 'dirty'.
dir_list=( . ) # list of component directories, always includes the EC tree
@@ -98,6 +99,7 @@ for git_dir in ${dir_list[@]}; do
ver+=" ${component}:"
fi
ver+="${vbase}"
+ tool_ver+="${vbase}"
popd > /dev/null
done
@@ -114,6 +116,9 @@ echo "#define CROS_EC_VERSION \"${ver}\""
echo "/* Version string, truncated to 31 chars (+ terminating null = 32) */"
echo "#define CROS_EC_VERSION32 \"${first_word:0:31}\""
+echo "/* Version string for ectool. */"
+echo "#define CROS_ECTOOL_VERSION \"${tool_ver}\""
+
echo "/* Sub-fields for use in Makefile.rules and to form build info string"
echo " * in common/version.c. */"
echo "#define VERSION \"${ver}\""