aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-11-19 07:43:32 -0700
committerTom Rini <trini@konsulko.com>2023-12-15 09:41:38 -0500
commit30ad6366c0eef6dd7d8753e2d58d0bb5fe944a3a (patch)
tree4964d4e46523115a783af6baf60141fab8a569f2
parentcedcf38ffffed883de4c90f1465bed20678b6146 (diff)
downloadu-boot-30ad6366c0eef6dd7d8753e2d58d0bb5fe944a3a.zip
u-boot-30ad6366c0eef6dd7d8753e2d58d0bb5fe944a3a.tar.gz
u-boot-30ad6366c0eef6dd7d8753e2d58d0bb5fe944a3a.tar.bz2
image: Show the load address when decompressing
The destination address for decompression (or copying) is useful information. Show this to the user while booting, e.g.: Uncompressing Kernel Image (no loading done) to 2080000 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
-rw-r--r--boot/image.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/boot/image.c b/boot/image.c
index 88b67bc..675b5dd 100644
--- a/boot/image.c
+++ b/boot/image.c
@@ -415,15 +415,20 @@ void image_print_contents(const void *ptr)
* @type: OS type (IH_OS_...)
* @comp_type: Compression type being used (IH_COMP_...)
* @is_xip: true if the load address matches the image start
+ * @load: Load address for printing
*/
-static void print_decomp_msg(int comp_type, int type, bool is_xip)
+static void print_decomp_msg(int comp_type, int type, bool is_xip,
+ ulong load)
{
const char *name = genimg_get_type_name(type);
+ /* Shows "Loading Kernel Image" for example */
if (comp_type == IH_COMP_NONE)
- printf(" %s %s\n", is_xip ? "XIP" : "Loading", name);
+ printf(" %s %s", is_xip ? "XIP" : "Loading", name);
else
- printf(" Uncompressing %s\n", name);
+ printf(" Uncompressing %s", name);
+
+ printf(" to %lx\n", load);
}
int image_decomp_type(const unsigned char *buf, ulong len)
@@ -448,7 +453,7 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
int ret = -ENOSYS;
*load_end = load;
- print_decomp_msg(comp, type, load == image_start);
+ print_decomp_msg(comp, type, load == image_start, load);
/*
* Load the image to the right place, decompressing if needed. After