summaryrefslogtreecommitdiff
path: root/common/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/version.c')
-rw-r--r--common/version.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/common/version.c b/common/version.c
new file mode 100644
index 0000000000..36567095ff
--- /dev/null
+++ b/common/version.c
@@ -0,0 +1,20 @@
+/* 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.
+ */
+
+/* Embed firmware version number in the binary */
+
+#include <stdint.h>
+#include "ec_version.h"
+#include "version.h"
+
+const struct version_struct version_data
+ __attribute__((section(".rodata.ver"))) = {
+ CROS_EC_VERSION_COOKIE1,
+ CROS_EC_VERSION,
+ CROS_EC_VERSION_COOKIE2
+};
+
+const char build_info[] __attribute__((section(".rodata.buildinfo"))) =
+ CROS_EC_BUILD_INFO;