piggy.o would be build for every time barebox was built This had the sideeffect that the image(s) would always be rebuilt despite no changes Fix this by adding piggy.o to targets and avoid an extra command in the rule to create .pblb files The patch includes the removal of a stray assignment Fixes: 2078438662 ("Add multi images support") Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx> --- images/Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/images/Makefile b/images/Makefile index 8271a0d24..dfdc89811 100644 --- a/images/Makefile +++ b/images/Makefile @@ -43,7 +43,9 @@ # quiet_cmd_objcopy_bin = OBJCOPYB $@ - cmd_objcopy_bin = $(OBJCOPY) -O binary $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ + cmd_objcopy_bin = \ + $(OBJCOPY) -O binary $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ && \ + $(objtree)/scripts/fix_size -f $@ pbl-lds := $(obj)/pbl.lds extra-y += $(pbl-lds) @@ -59,14 +61,11 @@ quiet_cmd_elf__ ?= LD $@ PBL_CPPFLAGS += -fdata-sections -ffunction-sections -piggy_o := piggy.$(suffix_y).o - $(obj)/%.pbl: $(pbl-lds) $(barebox-pbl-common) $(obj)/piggy.o FORCE $(call if_changed,elf__,$(*F)) $(obj)/%.pblb: $(obj)/%.pbl FORCE $(call if_changed,objcopy_bin,$(*F)) - $(Q)$(objtree)/scripts/fix_size -f $@ $(obj)/%.s: $(obj)/% FORCE $(call if_changed,disasm) @@ -114,7 +113,7 @@ include $(srctree)/images/Makefile.xburst include $(srctree)/images/Makefile.at91 include $(srctree)/images/Makefile.zynqmp -targets += $(image-y) pbl.lds barebox.x barebox.z +targets += $(image-y) pbl.lds barebox.x barebox.z piggy.o targets += $(patsubst %,%.pblb,$(pblb-y)) targets += $(patsubst %,%.pbl,$(pblb-y)) targets += $(patsubst %,%.s,$(pblb-y)) -- 2.12.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox