From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH master] sandbox: fix make dependency for sandbox
Date: Mon, 5 Jan 2026 09:12:46 +0100 [thread overview]
Message-ID: <20260105081251.3244288-2-a.fatoum@barebox.org> (raw)
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")
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
images/Makefile | 2 ++
images/Makefile.sandbox | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/images/Makefile b/images/Makefile
index 69447fd64541..ebbf57b46355 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -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 $@
diff --git a/images/Makefile.sandbox b/images/Makefile.sandbox
index 5f94b6e589e8..210a7bf48ac8 100644
--- a/images/Makefile.sandbox
+++ b/images/Makefile.sandbox
@@ -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)
--
2.47.3
next reply other threads:[~2026-01-05 8:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 8:12 Ahmad Fatoum [this message]
2026-01-06 7:42 ` Sascha Hauer
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=20260105081251.3244288-2-a.fatoum@barebox.org \
--to=a.fatoum@barebox.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