summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2012-05-08 08:43:18 -0700
committerBill Richardson <wfrichar@chromium.org>2012-05-08 08:49:52 -0700
commit4679f8f194153bc4bf9a9a16f4f4ce1b924d9e7d (patch)
tree9919f249b6b53617259d6417bbcd15e2e45eead3
parent468e34d51df1ab4cc934267c80d7a1e18406c845 (diff)
downloadchrome-ec-4679f8f194153bc4bf9a9a16f4f4ce1b924d9e7d.tar.gz
Mark end of each RW firmware image so we can find it.
This just adds a single byte to the end of the RW firmware, so that we can scan backwards from the end of the reserved block, skipping 0xff until we find the actual firmware size. We need this so we can resign existing firmware images without either signing a bunch of padding or forgetting to sign a trailing 0xff that might be important. BUG=chrome-os-partner:7459 TEST=none Change-Id: If5cadb4d58c1bce39f66815c328ffd18cc3d444b Signed-off-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r--common/firmware_image.lds.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/firmware_image.lds.S b/common/firmware_image.lds.S
index 3b2ef7f561..bfaaaee7f4 100644
--- a/common/firmware_image.lds.S
+++ b/common/firmware_image.lds.S
@@ -20,11 +20,13 @@ SECTIONS
. = ALIGN(CONFIG_FLASH_BANK_SIZE);
.image.A : AT(CONFIG_FW_A_OFF) {
*(.image.A)
+ BYTE(0xEA) /* Mark end explicitly */
} > FLASH =0xff
#ifndef CONFIG_NO_RW_B
. = ALIGN(CONFIG_FLASH_BANK_SIZE);
.image.B : AT(CONFIG_FW_B_OFF) {
*(.image.B)
+ BYTE(0xEB) /* Mark end explicitly */
} > FLASH =0xff
#endif
/* NOTE: EC implementation reserves one bank for itself */