summaryrefslogtreecommitdiff
path: root/include/version.h
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2012-02-29 00:39:41 +0000
committerVincent Palatin <vpalatin@chromium.org>2012-03-02 16:46:26 +0000
commita94e3277b332536a01d8e109f5ae277dcfe82337 (patch)
tree123b8db7b44a2b09fa80629b0cf92a9f3ebceff4 /include/version.h
parent1db93690d9b3fed1690f6645408384451c42519b (diff)
downloadchrome-ec-a94e3277b332536a01d8e109f5ae277dcfe82337.tar.gz
update versioning information stored in the EC
Add build information (date/time/builder) which can be displayed at the EC console. Generate a version from the board name and the branch tag. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chromium-os:27013 TEST=on BDS, run version command on the console. inspect the built binary. Change-Id: Idb1f68898ba6b811d02919f17ab4536ed9f8934a
Diffstat (limited to 'include/version.h')
-rw-r--r--include/version.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/include/version.h b/include/version.h
index 0031339c34..0ded5513e1 100644
--- a/include/version.h
+++ b/include/version.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -8,9 +8,22 @@
#ifndef __CROS_EC_VERSION_H
#define __CROS_EC_VERSION_H
-#define CROS_EC_VERSION_MAJOR 0
-#define CROS_EC_VERSION_MINOR 1
-#define CROS_EC_VERSION_SUBMINOR 2
-#define CROS_EC_VERSION_STRING "Link.0.1.2"
+#define STRINGIFY0(name) #name
+#define STRINGIFY(name) STRINGIFY0(name)
+
+#define CROS_EC_VERSION_COOKIE1 0xce112233
+#define CROS_EC_VERSION_COOKIE2 0xce445566
+
+#define CROS_EC_VERSION STRINGIFY(BOARD) "_" VERSION
+#define CROS_EC_BUILD_INFO CROS_EC_VERSION " " DATE " " BUILDER
+
+struct version_struct {
+ uint32_t cookie1;
+ char version[32];
+ uint32_t cookie2;
+} __attribute__ ((packed));
+
+extern const struct version_struct version_data;
+extern const char build_info[];
#endif /* __CROS_EC_VERSION_H */