diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2014-10-10 13:31:56 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-11 07:29:15 +0000 |
commit | 46102d3b4ed4958986b2272237a33513ee32fc92 (patch) | |
tree | 7b4efcf75b4b898c65e1c332abc232ce7986661d /common/version.c | |
parent | 63c41f239223cb343978635c7409ee341eeb08d8 (diff) | |
download | chrome-ec-46102d3b4ed4958986b2272237a33513ee32fc92.tar.gz |
usb: export firmware version
Remove the meaningless version string in iSerialNumber, which was incorrect
since this string should be unique to a device if it exists.
Export the firmware version string as the configuration string, so it's
traceable to a given firmware build/sources.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=samus
BUG=none
TEST=make buildall
from a workstation, do "sudo lsusb -v" and see the full version string
exported as the configuration name.
Change-Id: I557df2936421e2926ac0fc0003888370cec3e201
Reviewed-on: https://chromium-review.googlesource.com/222877
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/version.c')
-rw-r--r-- | common/version.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/version.c b/common/version.c index 766b4ad56b..a80d843580 100644 --- a/common/version.c +++ b/common/version.c @@ -6,7 +6,9 @@ /* Embed firmware version number in the binary */ #include <stdint.h> +#include "common.h" #include "ec_version.h" +#include "usb.h" #include "version.h" const struct version_struct version_data @@ -19,6 +21,11 @@ const struct version_struct version_data const char build_info[] __attribute__((section(".rodata.buildinfo"))) = CROS_EC_VERSION " " DATE " " BUILDER; +#ifdef CONFIG_USB +/* UTF-16 encoded USB string descriptor */ +const void * const usb_fw_version = USB_STRING_DESC(CROS_EC_VERSION32); +#endif + uint32_t ver_get_numcommits(void) { int i; |