summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-08-08 08:55:56 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-08-08 13:20:54 +0200
commitc2d13cb89ef1d3bfce4a67d165cea0d96ec8659d (patch)
tree199fd1c01bc703578a0ebdbdd1a78a2f11c428f4 /common
parenta6ae6ec12eb722efbb6a91a86ecbc2670c01c0c8 (diff)
downloadbarebox-c2d13cb89ef1d3bfce4a67d165cea0d96ec8659d.tar.gz
barebox-c2d13cb89ef1d3bfce4a67d165cea0d96ec8659d.tar.xz
booti: add debug prints for kernel header parsing
This proved useful in a debugging session, so make them easily available with a #define DEBUG for future developers. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220808065556.453090-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/booti.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/booti.c b/common/booti.c
index dde1605fe1..302d7440ab 100644
--- a/common/booti.c
+++ b/common/booti.c
@@ -1,6 +1,8 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: 2018 Sascha Hauer <s.hauer@pengutronix.de>
+#define pr_fmt(fmt) "booti: " fmt
+
#include <common.h>
#include <memory.h>
#include <bootm.h>
@@ -40,6 +42,11 @@ void *booti_load_image(struct image_data *data, phys_addr_t *oftree)
image_size = le64_to_cpup(kernel_header + 16);
kernel = get_kernel_address(data->os_address, text_offset);
+
+ print_hex_dump_bytes("header ", DUMP_PREFIX_OFFSET,
+ kernel_header, 80);
+ pr_debug("Kernel to be loaded to %lx+%lx\n", kernel, image_size);
+
if (kernel == UIMAGE_INVALID_ADDRESS)
return ERR_PTR(-ENOENT);