From fbfd828b9a28f4e91fc100ef9e474f590acc7989 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Wed, 30 May 2012 20:14:14 +0000 Subject: simple and self-contained EC flashing tool This produces a host binary running on the application processor and which is able to re-flash th EC firmware over the AP-to-EC link (either LPC or I2C). The payload (ie the EC firmware) to use is embedded inside the flasher binary. This is just aimed at testing and developer upgrade. The auto-update flow is using flashrom. Signed-off-by: Vincent Palatin BUG=None TEST=build for link/daisy/snow/bds and tests On Snow, run burn_my_ec from the serial console and see that the EC was correctly re-flashed. Change-Id: I7f90e773678a7ef3d8dc6dbacf54e80f3294607b Reviewed-on: https://gerrit.chromium.org/gerrit/24236 Reviewed-by: David Hendricks Tested-by: Vincent Palatin Reviewed-by: Randall Spangler Commit-Ready: Vincent Palatin --- Makefile.rules | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Makefile.rules') diff --git a/Makefile.rules b/Makefile.rules index 152a50e6e9..7b3274f914 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -30,14 +30,14 @@ cmd_lds = $(CPP) -P -C -MMD -MF $@.d -MT $@ $(CPPFLAGS) \ -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) \ - -DPROJECT=$* -Wl,--build-id=none -o $@ $< + -Wl,--build-id=none -o $@ $< cmd_elf_to_flat = $(OBJCOPY) -O binary $^ $@ cmd_elf_to_dis = $(OBJDUMP) -D $< > $@ cmd_elf = $(LD) $(LDFLAGS) $(objs) -o $@ -T $< -Map $(out)/$*.map cmd_c_to_o = $(CC) $(CFLAGS) -MMD -MF $@.d -c $< -o $@ cmd_c_to_build = $(BUILDCC) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) \ -MMD -MF $@.d $< -o $@ -cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) -MMD -MF $@.d $^ -o $@ +cmd_c_to_host = $(HOSTCC) $(HOST_CFLAGS) -MMD -MF $@.d $(filter %.c, $^) -o $@ cmd_qemu = ./util/run_qemu_test --image=build/$(BOARD)/$*/$*.bin test/$*.py \ $(silent) cmd_version = ./util/getversion.sh > $@ @@ -123,6 +123,8 @@ $(build-utils): $(out)/%:%.c $(host-utils): $(out)/%:%.c $(foreach u,$(host-util-common),util/$(u).c) $(call quiet,c_to_host,HOSTCC ) +$(out)/util/burn_my_ec: $(out)/$(PROJECT).bin + .PHONY: clean clean: -rm -rf $(out) -- cgit v1.2.1