From: Simon Glass <sjg@chromium.org>
Date: Mon, 10 Jan 2022 03:13:38 +0000 (-0700)
Subject: mkimage: Show the external-offset error
X-Git-Tag: v2025.01-rc5-pxa1908~1562^2~49
X-Git-Url: http://git.dujemihanovic.xyz/html/static/git-favicon.png?a=commitdiff_plain;h=206117afd137c88f0b0974088a9008bdf123eeb8;p=u-boot.git

mkimage: Show the external-offset error

This is a debug message at present, which is not very helpful. Print out
the error so that action can be taken.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

diff --git a/tools/fit_image.c b/tools/fit_image.c
index 8df95c40d2..9ac525623b 100644
--- a/tools/fit_image.c
+++ b/tools/fit_image.c
@@ -525,8 +525,9 @@ static int fit_extract_data(struct image_tool_params *params, const char *fname)
 	/* Check if an offset for the external data was set. */
 	if (params->external_offset > 0) {
 		if (params->external_offset < new_size) {
-			debug("External offset %x overlaps FIT length %x\n",
-			      params->external_offset, new_size);
+			fprintf(stderr,
+				"External offset %x overlaps FIT length %x\n",
+				params->external_offset, new_size);
 			ret = -EINVAL;
 			goto err;
 		}