diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-08-14 13:23:44 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-14 17:30:22 -0700 |
commit | 7dbb17f07e639acb1836d1ddbd72aa9e59bea6b7 (patch) | |
tree | 785c437e4ea50c4459220aa5ae7740dae5019b1c /core/cortex-m | |
parent | 1178484e0e728ab123b8bf3433624c92936b7229 (diff) | |
download | chrome-ec-7dbb17f07e639acb1836d1ddbd72aa9e59bea6b7.tar.gz |
Include 0xea byte as the last byte in RO/RW images
This is better than having the 0xea byte only appended in ec.bin,
since now the byte is present in ec.RW.flat and ec.RO.flat. Needed
for EC software sync.
BUG=chrome-os-partner:12412
BRANCH=link,snow
CQ-DEPEND=30305
TEST=manual
1. xxd ec.RW.bin | tail; should end with 0xea
2. xxd -g4 build/link/ec.bin | grep -C3 454e44ea
That word should be the last one before a bunch of 0xfffffff bytes.
There should be 2 matches (since there's RO and RW firmware)
Change-Id: I0de5cc78083f1a9b49202fbe2305a3101f401db3
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30303
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'core/cortex-m')
-rw-r--r-- | core/cortex-m/ec.lds.S | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 53c5960045..393c6c4bc6 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -136,7 +136,18 @@ SECTIONS /* Shared memory buffer must be at the end of preallocated RAM, so it * can expand to use all the remaining RAM. */ __shared_mem_buf = .; + + /* Tag at end of firmware image so that we can find the image size. + * This may be overwritten by the shared memory buffer; that's ok + * because we only use it to find the image size in flash. */ + . = ALIGN(4); + BYTE(0x45); + BYTE(0x4e); + BYTE(0x44); + BYTE(0xea); + /* NOTHING MAY GO AFTER THIS! */ } > IRAM + /* The linker won't notice if the .data section is too big to fit, * apparently because we're sending it into IRAM, not FLASH. The following * symbol isn't used by the code, but running "objdump -t *.elf | grep hey" |