Skip to contentSkip to conversation

sandbox: fix make dependency for sandbox

PATCH Applied Ahmad Fatoum 2 participants 2 messages Jan 5 – Jan 6

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sandbox: fix make dependency for sandbox

The final barebox ELF didn't have a dependency on barebox.o, which means that the final executable wasn't always updated.

Fix this by adding barebox.o into BAREBOX_PIGGY_OBJS, as the .elf rule already has $(BAREBOX_PIGGY_OBJS) as dependency.

Fixes 2aba0017c95a ("sandbox: switch to using PBL")
---
 images/Makefile         | 2 ++
 images/Makefile.sandbox | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
images/Makefile +2 -0
index 69447fd64541..ebbf57b46355 100644
@@ -58,6 +58,8 @@ $(pbl-lds): $(obj)/../arch/$(SRCARCH)/lib/pbl.lds.S FORCE
 
 ifeq ($(CONFIG_PBL_IMAGE_NO_PIGGY),)
 BAREBOX_PIGGY_OBJS = $(obj)/piggy.o $(obj)/sha_sum.o
+else
+BAREBOX_PIGGY_OBJS = $(obj)/../$(BAREBOX_PROPER)
 endif
 
 quiet_cmd_elf__ ?= LD      $@
images/Makefile.sandbox +1 -1
index 5f94b6e589e8..210a7bf48ac8 100644
@@ -21,7 +21,7 @@ endif
 quiet_cmd_elf__ = LD      $@
       cmd_elf__ = $(linker) -o $@ $(BAREBOX_LDFLAGS) \
 	-Wl,-T,$(pbl-lds) -Wl,--defsym=main=$(2) -Wl,--whole-archive \
-	$(obj)/../$(BAREBOX_PROPER) $(BAREBOX_PBL_OBJS) -Wl,--no-whole-archive \
+	$(BAREBOX_PIGGY_OBJS) $(BAREBOX_PBL_OBJS) -Wl,--no-whole-archive \
 	-lrt -pthread $(SANDBOX_LIBS) $(LDFLAGS_$(@F))
 
 ifeq ($(CONFIG_FUZZ_EXTERNAL),y)
Signature · 1 line
2.47.3
Applied
#1 lore raw
Quoted 8 lines · Ahmad Fatoum

The final barebox ELF didn't have a dependency on barebox.o, which means that the final executable wasn't always updated.

Fix this by adding barebox.o into BAREBOX_PIGGY_OBJS, as the .elf rule already has $(BAREBOX_PIGGY_OBJS) as dependency.

[...]

Applied, thanks!

[1/1] sandbox: fix make dependency for sandbox
https://git.pengutronix.de/cgit/barebox/commit/?id=82854ee1ff6d (link may not be stable)

Best regards,

Signature · 1 line
Sascha Hauer <[email protected]>