summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2019-01-23 15:13:01 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-02-18 08:51:20 -0800
commit0528c46598c8c89f04b7129722de50e178b62aa2 (patch)
tree9afe729c302f433174b1f8bcecfeaf206d5cb554 /Makefile.rules
parent80020d90d17ac1507abcefe9004ed6ae8cb9728d (diff)
downloadchrome-ec-0528c46598c8c89f04b7129722de50e178b62aa2.tar.gz
core: Allow .bss and .data sections in DRAM
We manually copy other .data from the original section on boot, and clear DRAM .bss. This way, a single object file (or archive) can be moved fully to DRAM. BRANCH=none BUG=b:122058243 TEST=With next CL, dram_test works Change-Id: I1a434bbd8a4135d16b3f49b0d1b75b96506e3e24 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1445652 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 8ea3c7cac0..7c158ffcad 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -61,9 +61,9 @@ cmd_obj_to_bin ?= $(OBJCOPY) --gap-fill=0xff -O binary $^ $(out)/$*.bin.tmp
cmd_flat_to_obj = $(CC) -Wl,-T $(out)/firmware_image.lds -nostdlib $(CPPFLAGS) \
-Wl,--build-id=none -o $@ $<
# Allow the .roshared section to overlap other sections (itself)
-cmd_ec_elf_to_flat ?= $(OBJCOPY) --set-section-flags .roshared=share -R .dram \
+cmd_ec_elf_to_flat ?= $(OBJCOPY) --set-section-flags .roshared=share -R .dram* \
-O binary $< $@
-cmd_ec_elf_to_flat_dram ?= $(OBJCOPY) -j .dram -O binary $< $@
+cmd_ec_elf_to_flat_dram ?= $(OBJCOPY) -j .dram* -O binary $< $@
cmd_elf_to_signed ?= $(SIGNER) --key=util/signer/$(3) \
--b --input=$< --format=bin --output=$@.signed $(SIGNER_EXTRAS) \
&& sudo chown $(shell whoami) $@.signed && mv $@.signed $@