summaryrefslogtreecommitdiffstats
path: root/common/booti.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/booti.c')
-rw-r--r--common/booti.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/common/booti.c b/common/booti.c
index dde1605fe1..e745ff6963 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>
@@ -31,7 +33,7 @@ void *booti_load_image(struct image_data *data, phys_addr_t *oftree)
{
const void *kernel_header =
data->os_fit ? data->fit_kernel : data->os_header;
- unsigned long text_offset, image_size, devicetree, kernel;
+ unsigned long text_offset, image_size, kernel;
unsigned long image_end;
int ret;
void *fdt;
@@ -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);
@@ -50,6 +57,8 @@ void *booti_load_image(struct image_data *data, phys_addr_t *oftree)
image_end = PAGE_ALIGN(kernel + image_size);
if (oftree) {
+ unsigned long devicetree;
+
if (bootm_has_initrd(data)) {
ret = bootm_load_initrd(data, image_end);
if (ret)
@@ -77,7 +86,7 @@ void *booti_load_image(struct image_data *data, phys_addr_t *oftree)
printf("Loaded kernel to 0x%08lx", kernel);
if (oftree)
- printf(", devicetree at 0x%08lx", devicetree);
+ printf(", devicetree at %pa", oftree);
printf("\n");
return (void *)kernel;