diff options
-rw-r--r-- | util/ectool.c | 2 | ||||
-rwxr-xr-x | util/getversion.sh | 5 |
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}\"" |