summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorJes B. Klinke <jbk@chromium.org>2023-01-24 14:38:39 -0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-01-25 20:38:23 +0000
commitf37804a6bdb895e60c484902a91aae79e64f2e25 (patch)
tree6615ad08a54e9c1f123f870434f80d7d3373f19b /include/config.h
parent18f8cc0d6976fe6a367fb872b848f2d311e6a4ac (diff)
downloadchrome-ec-f37804a6bdb895e60c484902a91aae79e64f2e25.tar.gz
common: Allow boards to opt out of image padding
The HyperDebug board uses the DFU bootloader in the same way as Servo V4 is going to, meaning that the RO section is 4kB and the RW section takes up the rest of the 512kB flash space. Currently, less than 64kB of actual code is in the RW. In order to make image files smaller, and speed up DFU flashing by a factor of ten, I want the option of not having the ec.bin image padded to the size of the flash space. This CL introduces a CONFIG_IMAGE_PADDING, which defaults to being enabled. TEST=make BOARD=hyperdebug, then flash the smaller image using DFU BUG=b:192262089 Change-Id: I12cdd4f7b7a3e48c9c7640bafa2d6f10e4ca24f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4193070 Commit-Queue: Jes Klinke <jbk@chromium.org> Tested-by: Jes Klinke <jbk@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
index ee9b354835..a448cf0147 100644
--- a/include/config.h
+++ b/include/config.h
@@ -2097,6 +2097,9 @@
/* Base address of program memory (physical address of AP) */
#undef CONFIG_PROGRAM_MEMORY_BASE_LOAD
+/* ec.bin image will be padded to match flash size. */
+#define CONFIG_IMAGE_PADDING
+
/*
* EC code can reside on internal or external storage. Only one of these
* CONFIGs should be defined. CONFIG_INTERNAL_STORAGE implies XIP