mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
util: do not generate unrelated version information
The recent addition of the multicomponent version string for cr50, requires further tweaking of the version generating script. In particular, the CROS_EC_VERSION32 variable used by the "verson" cli command is not supposed to include any information about subcomponents of the image, it should reflect the EC version only. Separating everything after the first space accomplishes that. BRANCH=none BUG=chrome-os-partner:55373 TEST=verified that RO_x and RW_x versions are printed properly: > vers Chip: g cr50 B2 Board: 0 RO_A: 0.0.1/84e2dde7 RO_B: * 0.0.3/8fe06b9e RW_A: cr50_v1.1.4992-7c9f891+ private RW_B: * cr50_v1.1.4989-52b3cc6+ ... Change-Id: I192eb29816dfa963b08aa97f749b978b1367d6b7 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/364490 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
d6c71d9031
commit
ea91c71c08
@@ -98,13 +98,18 @@ for git_dir in ${dir_list[@]}; do
|
||||
popd > /dev/null
|
||||
done
|
||||
|
||||
# On some boards where the version number consists of multiple components we
|
||||
# want to separate the first word of the version string as the version of the
|
||||
# EC tree.
|
||||
IFS=' ' first_word=(${ver})
|
||||
|
||||
echo "/* This file is generated by util/getversion.sh */"
|
||||
|
||||
echo "/* Version string for use by common/version.c */"
|
||||
echo "#define CROS_EC_VERSION \"${ver}\""
|
||||
|
||||
echo "/* Version string, truncated to 31 chars (+ terminating null = 32) */"
|
||||
echo "#define CROS_EC_VERSION32 \"${ver:0:31}\""
|
||||
echo "#define CROS_EC_VERSION32 \"${first_word:0:31}\""
|
||||
|
||||
echo "/* Sub-fields for use in Makefile.rules and to form build info string"
|
||||
echo " * in common/version.c. */"
|
||||
|
||||
Reference in New Issue
Block a user