From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 3/3] pbl: decomp: report errors on PBL console as well
Date: Mon, 12 Jan 2026 09:56:06 +0100 [thread overview]
Message-ID: <20260112085617.2952747-3-a.fatoum@barebox.org> (raw)
In-Reply-To: <20260112085617.2952747-1-a.fatoum@barebox.org>
Decompression errors without DEBUG_LL shouldn't result in a silent hang
when CONFIG_PBL_CONSOLE is enabled.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
include/pbl.h | 5 +++++
pbl/decomp.c | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/include/pbl.h b/include/pbl.h
index b330010562c4..063cd15cf0ea 100644
--- a/include/pbl.h
+++ b/include/pbl.h
@@ -34,5 +34,10 @@ int pbl_barebox_verify(const void *compressed_start, unsigned int len,
void __noreturn barebox_pbl_entry(ulong, ulong, void *);
+#ifdef CONFIG_PBL_CONSOLE
+#define pbl_puts puts
+#else
+#define pbl_puts puts_ll
+#endif
#endif /* __PBL_H__ */
diff --git a/pbl/decomp.c b/pbl/decomp.c
index ebdf81ddfbe5..c314f4901a48 100644
--- a/pbl/decomp.c
+++ b/pbl/decomp.c
@@ -45,10 +45,10 @@ STATIC int decompress(u8 *input, int in_len,
static void noinline errorfn(char *error)
{
- puts_ll("ERROR: ");
- puts_ll(error);
- puts_ll("\nHANG\n");
- while (1);
+ pbl_puts("ERROR: ");
+ pbl_puts(error);
+ pbl_puts("\nHANG\n");
+ __hang();
}
extern unsigned char sha_sum[];
--
2.47.3
prev parent reply other threads:[~2026-01-12 8:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-12 8:56 [PATCH 1/3] regulator: bcm2835: register only on Raspberry Pi Ahmad Fatoum
2026-01-12 8:56 ` [PATCH 2/3] commands: md: fix OOB read when mmapping Ahmad Fatoum
2026-01-12 8:56 ` Ahmad Fatoum [this message]
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=20260112085617.2952747-3-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