[PATCH 3/4] mkimage: define log_err and log_info

Ludwig Nussel ludwig.nussel at siemens.com
Mon Apr 27 17:03:40 CEST 2026


Define log_err an log_info centrally in mkimage.h so any file used
in this context benefits from it.

Signed-off-by: Ludwig Nussel <ludwig.nussel at siemens.com>
---

 boot/image-pre-load.c | 3 ---
 tools/mkimage.h       | 2 ++
 2 files changed, 2 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..62fbfcacbb3 100644
--- a/tools/mkimage.h
+++ b/tools/mkimage.h
@@ -31,6 +31,8 @@
 #endif /* MKIMAGE_DEBUG */
 
 #define log_debug(fmt, args...)	debug(fmt, ##args)
+#define log_info(fmt, args...)	printf(fmt, ##args)
+#define log_err(fmt, args...)	fprintf(stderr, fmt, ##args)
 
 static inline void *map_sysmem(ulong paddr, unsigned long len)
 {
-- 
2.43.0

base-commit: 9f61fd5b80a43ae20ba115e3a2933d47d720ab82
branch: us-qemu-signatures


More information about the U-Boot mailing list