diff options
author | Brian J. Nemec <bnemec@google.com> | 2023-01-19 14:44:10 -0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-01-20 23:40:14 +0000 |
commit | 4c434db787f3e65b2ac25fac8c2d65f250a45994 (patch) | |
tree | b381e402b8bfea7cfbd7697695254ae596a0d411 | |
parent | 0c982121aef6ac125c54a16736c616a336b417c5 (diff) | |
download | chrome-ec-4c434db787f3e65b2ac25fac8c2d65f250a45994.tar.gz |
Zephyr: Remove binman.dtsi requirements
Starfish uses the EC build environment but does not
use the CrOSEC stubs and does not use the EC partition.
This leads to linker errors when building due to
CONFIG_PLATFORM_EC_RW_TOTAL_IMAGE_SIZE dependencies
which is undefined on Zephyr only targets.
Adds defined() guards to checks in the linker to avoid
build failures.
BUG=b:243700103
BRANCH=None
TEST=None
Change-Id: I98b207f25edd4f6306fa9ed3a0c1a0ce91f46856
Signed-off-by: Brian Nemec <bnemec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4182530
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r-- | zephyr/linker/end-of-ram.ld | 2 | ||||
-rw-r--r-- | zephyr/linker/image_size.ld | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/zephyr/linker/end-of-ram.ld b/zephyr/linker/end-of-ram.ld index e03de7481d..91e8385950 100644 --- a/zephyr/linker/end-of-ram.ld +++ b/zephyr/linker/end-of-ram.ld @@ -12,7 +12,7 @@ SECTION_PROLOGUE(.end_of_ram_info, 0, ) { ASSERT(DEFINED(_image_ram_end) && _image_ram_end > 0, "Error: _image_ram_end is not defined"); -#if defined(RAM_ADDR) && defined(RAM_SIZE) +#if defined(RAM_ADDR) && defined(RAM_SIZE) && defined(CONFIG_PLATFORM_EC_PRESERVED_END_OF_RAM_SIZE) PROVIDE(__unused_ram_start = _image_ram_end); PROVIDE(__unused_ram_end = RAM_ADDR + RAM_SIZE); PROVIDE(__unused_ram_size = __unused_ram_end - __unused_ram_start); diff --git a/zephyr/linker/image_size.ld b/zephyr/linker/image_size.ld index 170daf141d..efeeafa3d4 100644 --- a/zephyr/linker/image_size.ld +++ b/zephyr/linker/image_size.ld @@ -3,8 +3,7 @@ * found in the LICENSE file. */ -#if defined(CONFIG_CPU_CORTEX_M) || defined(CONFIG_CPU_CORTEX_R) || \ - defined(CONFIG_CPU_CORTEX_A) || defined (CONFIG_RISCV) +#if defined(CONFIG_PLATFORM_EC_RW_TOTAL_IMAGE_SIZE) __image_size = CONFIG_PLATFORM_EC_RW_TOTAL_IMAGE_SIZE; #else /* |