summaryrefslogtreecommitdiff
path: root/common/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/version.c')
-rw-r--r--common/version.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/version.c b/common/version.c
index ff8207bf2c..06cbfbab01 100644
--- a/common/version.c
+++ b/common/version.c
@@ -7,9 +7,13 @@
#include <stdint.h>
#include "common.h"
+#include "compile_time_macros.h"
#include "ec_version.h"
#include "version.h"
+BUILD_ASSERT(CONFIG_ROLLBACK_VERSION >= 0);
+BUILD_ASSERT(CONFIG_ROLLBACK_VERSION <= INT32_MAX);
+
const struct image_data __keep current_image_data
__attribute__((section(".rodata.ver"))) = {
.cookie1 = CROS_EC_IMAGE_DATA_COOKIE1,
@@ -17,6 +21,7 @@ const struct image_data __keep current_image_data
#ifndef TEST_BUILD
.size = (const uintptr_t)&__image_size,
#endif
+ .rollback_version = CONFIG_ROLLBACK_VERSION,
.cookie2 = CROS_EC_IMAGE_DATA_COOKIE2,
};