summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/firmware_image.lds.S2
-rw-r--r--include/config.h3
-rw-r--r--util/config_allowed.txt1
3 files changed, 6 insertions, 0 deletions
diff --git a/common/firmware_image.lds.S b/common/firmware_image.lds.S
index 5bcd6efb5f..e62818eebb 100644
--- a/common/firmware_image.lds.S
+++ b/common/firmware_image.lds.S
@@ -126,9 +126,11 @@ SECTIONS
} > FLASH =0xff
#endif
#endif
+#ifdef CONFIG_IMAGE_PADDING
.padding : AT(IMAGE_PADDING_AT) {
BYTE(0xff);
} > FLASH =0xff
+#endif
#ifdef CONFIG_IPI
/* The section holds address of IPI buffer but no symbols. */
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
diff --git a/util/config_allowed.txt b/util/config_allowed.txt
index 116b81f653..160e208c21 100644
--- a/util/config_allowed.txt
+++ b/util/config_allowed.txt
@@ -500,6 +500,7 @@ CONFIG_I2C_SCL_GATE_PORT
CONFIG_I2C_UPDATE_IF_CHANGED
CONFIG_I2C_XFER_BOARD_CALLBACK
CONFIG_I2C_XFER_LARGE_TRANSFER
+CONFIG_IMAGE_PADDING
CONFIG_INA231
CONFIG_INA3221
CONFIG_INDUCTIVE_CHARGING