summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.rules b/Makefile.rules
index bf7680cd43..28eae3a7d3 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -61,8 +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 \
+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_elf_to_signed ?= $(SIGNER) --key=util/signer/$(3) \
--b --input=$< --format=bin --output=$@.signed $(SIGNER_EXTRAS) \
&& sudo chown $(shell whoami) $@.signed && mv $@.signed $@
@@ -382,6 +383,8 @@ flat-$(CONFIG_FW_INCLUDE_RO) += $(out)/RO/$(PROJECT).RO.flat
deps += $(out)/firmware_image.lds.d $(flat-y:%.flat=%.lds.d)
+flat-$(CONFIG_DRAM_BASE) += $(out)/RW/$(PROJECT).RW.flat.dram
+
flat-$(CONFIG_RWSIG_TYPE_RWSIG) += $(out)/key.vbpubk2
flat-$(CONFIG_RWSIG_TYPE_RWSIG) += $(out)/RW/$(PROJECT).RW.flat.sig
@@ -401,6 +404,9 @@ ifeq ($(SIGNED_IMAGES),)
$(out)/%.flat: $(out)/%.elf $(out)/%.smap utils-build
$(call quiet,ec_elf_to_flat,OBJCOPY)
+$(out)/%.flat.dram: $(out)/%.elf $(out)/%.smap utils-build
+ $(call quiet,ec_elf_to_flat_dram,OBJCOPY)
+
$(out)/RO/%.hex: $(out)/RO/%.elf $(out)/RO/%.smap
$(call quiet,elf_to_hex,OBJCOPY)
else