summaryrefslogtreecommitdiff
path: root/chip
diff options
context:
space:
mode:
authorJes B. Klinke <jbk@chromium.org>2023-01-24 15:25:38 -0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-02-08 06:37:21 +0000
commit34b778f17b247b371a486dc89e80d3566e5c39ac (patch)
treefe64d15173c8e849bc5c31b29f37a25ba21db772 /chip
parentefaba4f3b6d014fd77782e35b6a184d39c6c50b4 (diff)
downloadchrome-ec-34b778f17b247b371a486dc89e80d3566e5c39ac.tar.gz
chip/stm32: Fix for opting out of flash support
Adapt dfu_bootmanager_main.c to compile without flash support. BUG=b:192262089 TEST=make BOARD=hyperdebug Change-Id: I9ceca733062b46ed7087ef7725bc1f6ac68c6b0a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4193071 Commit-Queue: Jes Klinke <jbk@chromium.org> Reviewed-by: Brian Nemec <bnemec@google.com> Tested-by: Jes Klinke <jbk@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r--chip/stm32/dfu_bootmanager_main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/chip/stm32/dfu_bootmanager_main.c b/chip/stm32/dfu_bootmanager_main.c
index 6fb53eee96..cec747e762 100644
--- a/chip/stm32/dfu_bootmanager_main.c
+++ b/chip/stm32/dfu_bootmanager_main.c
@@ -51,7 +51,10 @@
*/
static int rw_is_empty(void)
{
- return crec_flash_is_erased(CONFIG_RW_MEM_OFF, 8);
+ if (IS_ENABLED(CONFIG_FLASH_CROS))
+ return crec_flash_is_erased(CONFIG_RW_MEM_OFF, 8);
+ /* No flash support, we cannot tell. Assume not empty. */
+ return 0;
}
/*