summaryrefslogtreecommitdiff
path: root/core/cortex-m
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2015-08-21 13:27:56 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-08-22 01:37:31 +0000
commit6f8637a6dfc3588367df7d211f26ea5b67ebbea1 (patch)
tree74f8f04c6f4f7125c724769445088ece1334cd3f /core/cortex-m
parent65d683a7e50f919669ff2e127c0e881642857fee (diff)
downloadchrome-ec-6f8637a6dfc3588367df7d211f26ea5b67ebbea1.tar.gz
cortex-m: provide ability to insert free space into RO image base
Some platforms might expect the header of the image to be a certain platform specific blob. This patch adds an ability to insert an arbitrary size header in the binary blob, if so desired, the intention is to have the platform specific tools to postprocess the image and replace the header with sensible data. Ideally we should be able to produce an image which is mapped to start at an offset to the FLASH_BASE, but the macros in ec.S.lds files are way too smart for this. BRANCH=none BUG=chrome-os-partner:43025 TEST=with this and other changes the latest cr50 image gets signed and booted properly. Change-Id: Icabf00c6b90657b0ae3370ddad3567ccedf3ff49 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/295200 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'core/cortex-m')
-rw-r--r--core/cortex-m/ec.lds.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index dc9e829fa1..d0b90e5ada 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -68,6 +68,9 @@ SECTIONS
} > SHARED_LIB
#endif
.text : {
+#if defined(CONFIG_RO_HEAD_ROOM)
+ . = . + CONFIG_RO_HEAD_ROOM;
+#endif
OUTDIR/core/CORE/init.o (.text.vecttable)
. = ALIGN(4);
__version_struct_offset = .;