mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
ef: pad any gaps between the BL bank and the FW bank
The Entire Flash (EF) image for revo has a gap between the end of the BL bank and the start of the FW bank. This fills the gap with 0xFF and properly aligns the FW image in flash.
This commit is contained in:
parent
eab923fee0
commit
9b33be5d65
@ -33,11 +33,16 @@ 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:
|
||||
$(V0) @echo " PADDING $@"
|
||||
$(V1) dd status=noxfer if=/dev/zero count=$(FW_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).bin: $(BL_BIN) $(FW_BIN) $(OUTDIR)/$(TARGET).pad
|
||||
$(V0) @echo " FLASH IMG $@"
|
||||
$(V1) cat $(BL_BIN) $(FW_BIN) > $@
|
||||
$(V1) cat $(BL_BIN) $(OUTDIR)/$(TARGET).pad $(FW_BIN) > $@
|
||||
|
||||
.PHONY: dfu
|
||||
dfu: $(OUTDIR)/$(TARGET).bin
|
||||
|
Loading…
x
Reference in New Issue
Block a user