From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] sandbox: fix race with .old_version removal
Date: Fri, 28 Nov 2025 11:41:27 +0100 [thread overview]
Message-ID: <20251128104143.1578832-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20251128104143.1578832-1-a.fatoum@pengutronix.de>
From: Ahmad Fatoum <a.fatoum@barebox.org>
On sandbox, .old_version is created and removed by the barebox.o recipe
and the barebox ELF itself is never built and instead it's a symlink
created by the barebox__ rule override.
Drop the rm -f .old_version in that case, so the file is not removed too soon.
A cleaner way would be to factor this logic out to a shell script like
Linux does as it's serialized anyway and there's no benefit of having
the steps as make targets, but that's left as future exercise.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index 2534fb4b467b..f958114480f9 100644
--- a/Makefile
+++ b/Makefile
@@ -1083,7 +1083,9 @@ PHONY += check
# ---------------------------------------------------------------------------
barebox: $(BAREBOX_LDS) $(BAREBOX_OBJS) $(kallsyms.o) FORCE
$(call if_changed_rule,barebox__)
+ifeq ($(BAREBOX_PROPER),barebox)
$(Q)rm -f .old_version
+endif
barebox.fit: images/barebox-$(CONFIG_ARCH_LINUX_NAME).fit
$(Q)ln -fsn $< $@
--
2.47.3
next prev parent reply other threads:[~2025-11-28 10:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 10:41 [PATCH 1/3] kbuild: drop non-existent targets from CLEAN_FILES Ahmad Fatoum
2025-11-28 10:41 ` Ahmad Fatoum [this message]
2025-11-28 10:41 ` [PATCH 3/3] ARM: lib64: rename pbl.o to delay.o Ahmad Fatoum
2025-12-01 9:56 ` [PATCH 1/3] kbuild: drop non-existent targets from CLEAN_FILES 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=20251128104143.1578832-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--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