[PATCH v3 2/4] mkimage: define log_err and log_info
Ludwig Nussel
ludwig.nussel at siemens.com
Thu May 7 14:06:23 CEST 2026
Define log_err and log_info centrally in mkimage.h so any file used in
this context benefits from it.
This patch is in preparation for a change in image-fit-sig.c in the
next patch.
Signed-off-by: Ludwig Nussel <ludwig.nussel at siemens.com>
---
Changes in v3:
- make log_err use stdout too
boot/image-pre-load.c | 3 ---
tools/mkimage.h | 5 +++++
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/boot/image-pre-load.c b/boot/image-pre-load.c
index 2f851ebb28c..cd319ddb777 100644
--- a/boot/image-pre-load.c
+++ b/boot/image-pre-load.c
@@ -35,9 +35,6 @@ ulong image_load_offset;
*/
static struct image_sig_info *host_info;
-#define log_info(fmt, args...) printf(fmt, ##args)
-#define log_err(fmt, args...) printf(fmt, ##args)
-
void image_pre_load_sig_set_info(struct image_sig_info *info)
{
host_info = info;
diff --git a/tools/mkimage.h b/tools/mkimage.h
index 5d6bcc9301a..caa51491f02 100644
--- a/tools/mkimage.h
+++ b/tools/mkimage.h
@@ -31,6 +31,11 @@
#endif /* MKIMAGE_DEBUG */
#define log_debug(fmt, args...) debug(fmt, ##args)
+#define log_info(fmt, args...) printf(fmt, ##args)
+/* can't use stderr here as that's unbuffered and would produce
+ * output different from u-boot's console
+ */
+#define log_err(fmt, args...) printf(fmt, ##args)
static inline void *map_sysmem(ulong paddr, unsigned long len)
{
--
2.43.0
More information about the U-Boot
mailing list