From 4679f8f194153bc4bf9a9a16f4f4ce1b924d9e7d Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Tue, 8 May 2012 08:43:18 -0700 Subject: 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 --- common/firmware_image.lds.S | 2 ++ 1 file changed, 2 insertions(+) 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 */ -- cgit v1.2.1