From 803e3c4d1e6e059b6a887887f658d42fde112405 Mon Sep 17 00:00:00 2001 From: Stacey Sheldon Date: Wed, 5 Sep 2012 21:41:18 -0400 Subject: [PATCH] ef: Add fwinfo to entireflash (EF) images EF images were missing the firmware info blob that describes which firmware is installed on the board. The EF image is now padded out to fill the firmware bank and the info blob is properly placed at the tail end of the firmware bank. --- flight/EntireFlash/Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/flight/EntireFlash/Makefile b/flight/EntireFlash/Makefile index 548461a24..13aae597d 100644 --- a/flight/EntireFlash/Makefile +++ b/flight/EntireFlash/Makefile @@ -33,16 +33,23 @@ OUTDIR := $(TOP)/build/$(TARGET) .PHONY: bin bin: $(OUTDIR)/$(TARGET).bin -FW_PAD = $(shell echo $$[$(FW_BANK_BASE)-$(BL_BANK_BASE)-$(BL_BANK_SIZE)]) -$(OUTDIR)/$(TARGET).pad: +FW_PRE_PAD = $(shell echo $$[$(FW_BANK_BASE)-$(BL_BANK_BASE)-$(BL_BANK_SIZE)]) +$(OUTDIR)/$(TARGET).fw_pre.pad: $(V0) @echo $(MSG_PADDING) $@ - $(V1) dd status=noxfer if=/dev/zero count=$(FW_PAD) bs=1 2>/dev/null | tr '\000' '\377' > $@ + $(V1) dd status=noxfer if=/dev/zero count=$(FW_PRE_PAD) bs=1 2>/dev/null | tr '\000' '\377' > $@ + +FW_POST_PAD = $(shell echo $$[$(FW_BANK_SIZE)-$(FW_DESC_SIZE)-$$(stat -c%s $(FW_BIN))]) +$(OUTDIR)/$(TARGET).fw_post.pad: + $(V0) @echo $(MSG_PADDING) $@ + $(V1) dd status=noxfer if=/dev/zero count=$(FW_POST_PAD) bs=1 2>/dev/null | tr '\000' '\377' > $@ + BL_BIN = $(TOP)/build/bl_$(BOARD_NAME)/bl_$(BOARD_NAME).bin FW_BIN = $(TOP)/build/fw_$(BOARD_NAME)/fw_$(BOARD_NAME).bin -$(OUTDIR)/$(TARGET).bin: $(BL_BIN) $(FW_BIN) $(OUTDIR)/$(TARGET).pad +FWINFO_BIN = $(FW_BIN).firmwareinfo.bin +$(OUTDIR)/$(TARGET).bin: $(BL_BIN) $(FW_BIN) $(OUTDIR)/$(TARGET).fw_pre.pad $(OUTDIR)/$(TARGET).fw_post.pad $(V0) @echo $(MSG_FLASH_IMG) $@ - $(V1) cat $(BL_BIN) $(OUTDIR)/$(TARGET).pad $(FW_BIN) > $@ + $(V1) cat $(BL_BIN) $(OUTDIR)/$(TARGET).fw_pre.pad $(FW_BIN) $(OUTDIR)/$(TARGET).fw_post.pad $(FWINFO_BIN) > $@ .PHONY: dfu dfu: $(OUTDIR)/$(TARGET).bin