summaryrefslogtreecommitdiff
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
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>
-rw-r--r--util/ectool.c2
-rwxr-xr-xutil/getversion.sh5
2 files changed, 6 insertions, 1 deletions
diff --git a/util/ectool.c b/util/ectool.c
index d70ffed571..7198694d26 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -641,7 +641,7 @@ int cmd_version(int argc, char *argv[])
image_names[r.current_image] : "?"));
printf("Build info: %s\n", build_string);
exit:
- printf("Tool version: %s %s %s\n", CROS_EC_VERSION, DATE, BUILDER);
+ printf("Tool version: %s %s %s\n", CROS_ECTOOL_VERSION, DATE, BUILDER);
return rv;
}
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}\""