From: Sam Ravnborg <sam@ravnborg.org>
To: Barebox List <barebox@lists.infradead.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH v1 2/5] images: fix force rebuild of piggy.o
Date: Mon, 31 Dec 2018 09:07:22 +0100 [thread overview]
Message-ID: <20181231080725.2141-3-sam@ravnborg.org> (raw)
In-Reply-To: <20181231080725.2141-1-sam@ravnborg.org>
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@ravnborg.org>
---
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2018-12-31 8:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-31 8:07 [PATCH 0/5] Independent collection of patches Sam Ravnborg
2018-12-31 8:07 ` [PATCH v1 1/5] 2d-primitives: fix no previous prototype warning Sam Ravnborg
2018-12-31 8:07 ` Sam Ravnborg [this message]
2019-01-03 9:06 ` [PATCH v1 2/5] images: fix force rebuild of piggy.o Sascha Hauer
2018-12-31 8:07 ` [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector() Sam Ravnborg
2019-01-04 7:27 ` Sascha Hauer
2019-01-06 20:38 ` Sam Ravnborg
2019-01-07 7:41 ` Sascha Hauer
2018-12-31 8:07 ` [PATCH v1 4/5] at91sam9263ek: fix build of of_init Sam Ravnborg
2018-12-31 8:07 ` [PATCH v1 5/5] video: mtl017: fix driver name variable Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181231080725.2141-3-sam@ravnborg.org \
--to=sam@ravnborg.org \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox