From 0528c46598c8c89f04b7129722de50e178b62aa2 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 23 Jan 2019 15:13:01 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1445652 Reviewed-by: Jett Rink --- Makefile.rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile.rules') 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 $@ -- cgit v1.2.1