summaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2012-04-27 10:23:14 -0700
committerBill Richardson <wfrichar@chromium.org>2012-05-01 15:54:39 -0700
commit8d921af0bb4f189c10d11bb0bfce286fb92d348c (patch)
tree31dd1245146630cf90d10bdb96ef8013236ecaf0 /Makefile.rules
parenta5027ece4cb02a736db3db1e971bffd699422dec (diff)
downloadchrome-ec-8d921af0bb4f189c10d11bb0bfce286fb92d348c.tar.gz
Add basic FMAP to EC firmware image.
This is very basic, so you can only rely on RO_SECTION, RW_SECTION_A, and RW_SECTION_B for now. We'll fill in more regions as we add vboot stuff. Still, you should be able to do things like this: flashrom -p internal:bus=lpc -r ec.bin flashrom -p internal:bus=lpc -w ec.bin -i RW_SECTION:ec.B.flat BUG=chrome-os-partner:8198 TEST=manual Build the image, look for the FMAP in it. cd src/platform/ec make BOARD=link dump_fmap ./build/link/ec.bin Change-Id: I0adbbfb8e975faae805bda271873fcef46590cf4 Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules2
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 647a7b27c3..ea7a961777 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -15,6 +15,7 @@ _dir_create := $(foreach d,$(dirs),$(shell [ -d $(out)/$(d) ] || \
mkdir -p $(out)/$(d)))
section = $(subst .,,$(suffix $(1)))
+section_is = $(subst .,,SECTION_IS_$(suffix $(1)))
# Decrease verbosity unless you pass V=1
quiet = $(if $(V),,@echo ' $(2)' $(subst $(out)/,,$@) ; )$(cmd_$(1))
@@ -22,6 +23,7 @@ silent = $(if $(V),,1>/dev/null)
# commands to build all targets
cmd_lds = $(CPP) -P -C -MMD -MF $@.d -MT $@ $(CPPFLAGS) \
+ -D$(call section_is,$*) \
-DSECTION=$(call section,$*) $< -o $@
cmd_obj_to_bin = $(OBJCOPY) --gap-fill=0xff -O binary $^ $@
cmd_flat_to_obj = $(CC) -T $(out)/firmware_image.lds -nostdlib $(CPPFLAGS) \