diff options
author | Yuval Peress <peress@chromium.org> | 2021-03-02 21:32:59 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-03 16:21:48 +0000 |
commit | 55709d8850459e63c641924fad8f2fabd33cd5e4 (patch) | |
tree | 41efaa4ea69feabc10e859ad8f7514da2dc6501e /zephyr | |
parent | c8834820cb706bb9b4b31575246e5c8be4621127 (diff) | |
download | chrome-ec-55709d8850459e63c641924fad8f2fabd33cd5e4.tar.gz |
zephyr: Fix version command
The current config_chip used by Zephyr defaulted to setting the RO
header size and offset to 0 if the header was turned off. This isn't
correct as the CONFIG_PLATFORM_EC_RO_HEADER just tells us whether or
not to generate the header, whereas the _SIZE and _OFFSET values
should still be there even in the RW image.
Now running `version` from both the RO and RW image shows:
21-03-02 21:28:21.455 Chip: chromeos emu
21-03-02 21:28:21.460 Board: 1
21-03-02 21:28:21.486 RO: _v2.0.7727+3f8b76fa7
21-03-02 21:28:21.496 RW: _v2.0.7727+3f8b76fa7
21-03-02 21:28:21.497 Build: _v2.0.7727+3f8b76fa7
21-03-02 21:28:21.500 2021-03-02 21:01:09
BRANCH=none
BUG=b:181599007
TEST=built/flashed volteer and ran `version` from both RO and RW
images
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I435f224fc2b3b3a5ca54d3335ea8cd50e9ab5a2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2731287
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'zephyr')
-rw-r--r-- | zephyr/shim/include/config_chip.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index 660e57f9c6..97e4ddf607 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -1131,12 +1131,16 @@ enum battery_type { #endif #undef CONFIG_RO_HDR_MEM_OFF -#undef CONFIG_RO_HDR_SIZE -#ifdef CONFIG_PLATFORM_EC_RO_HEADER +#ifdef CONFIG_PLATFORM_EC_RO_HEADER_OFFSET #define CONFIG_RO_HDR_MEM_OFF CONFIG_PLATFORM_EC_RO_HEADER_OFFSET -#define CONFIG_RO_HDR_SIZE CONFIG_PLATFORM_EC_RO_HEADER_SIZE #else #define CONFIG_RO_HDR_MEM_OFF 0 +#endif + +#undef CONFIG_RO_HDR_SIZE +#ifdef CONFIG_PLATFORM_EC_RO_HEADER_SIZE +#define CONFIG_RO_HDR_SIZE CONFIG_PLATFORM_EC_RO_HEADER_SIZE +#else #define CONFIG_RO_HDR_SIZE 0 #endif |