mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-31 03:21:32 +00:00
spl: fix debug prints for tiny printf
Tiny printf does not support %.*s and %lX. Since tiny printf should be very common in SPL, replace these by %32s (for printing image name) and %lx. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
84ee59a5fd
commit
30c0740e79
1 changed files with 6 additions and 8 deletions
|
@ -185,9 +185,8 @@ static int spl_load_fit_image(struct spl_image_info *spl_image,
|
||||||
spl_image->os = IH_OS_U_BOOT;
|
spl_image->os = IH_OS_U_BOOT;
|
||||||
spl_image->name = "U-Boot";
|
spl_image->name = "U-Boot";
|
||||||
|
|
||||||
debug("spl: payload image: %.*s load addr: 0x%lx size: %d\n",
|
debug("spl: payload image: %32s load addr: 0x%lx size: %d\n",
|
||||||
(int)sizeof(spl_image->name), spl_image->name,
|
spl_image->name, spl_image->load_addr, spl_image->size);
|
||||||
spl_image->load_addr, spl_image->size);
|
|
||||||
|
|
||||||
#ifdef CONFIG_SPL_FIT_SIGNATURE
|
#ifdef CONFIG_SPL_FIT_SIGNATURE
|
||||||
images.verify = 1;
|
images.verify = 1;
|
||||||
|
@ -256,9 +255,8 @@ int spl_parse_image_header(struct spl_image_info *spl_image,
|
||||||
}
|
}
|
||||||
spl_image->os = image_get_os(header);
|
spl_image->os = image_get_os(header);
|
||||||
spl_image->name = image_get_name(header);
|
spl_image->name = image_get_name(header);
|
||||||
debug("spl: payload image: %.*s load addr: 0x%lx size: %d\n",
|
debug("spl: payload image: %32s load addr: 0x%lx size: %d\n",
|
||||||
IH_NMLEN, spl_image->name,
|
spl_image->name, spl_image->load_addr, spl_image->size);
|
||||||
spl_image->load_addr, spl_image->size);
|
|
||||||
#else
|
#else
|
||||||
/* LEGACY image not supported */
|
/* LEGACY image not supported */
|
||||||
debug("Legacy boot image support not enabled, proceeding to other boot methods\n");
|
debug("Legacy boot image support not enabled, proceeding to other boot methods\n");
|
||||||
|
@ -314,7 +312,7 @@ __weak void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
|
||||||
image_entry_noargs_t image_entry =
|
image_entry_noargs_t image_entry =
|
||||||
(image_entry_noargs_t)spl_image->entry_point;
|
(image_entry_noargs_t)spl_image->entry_point;
|
||||||
|
|
||||||
debug("image entry point: 0x%lX\n", spl_image->entry_point);
|
debug("image entry point: 0x%lx\n", spl_image->entry_point);
|
||||||
image_entry();
|
image_entry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -554,7 +552,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
|
||||||
debug("Unsupported OS image.. Jumping nevertheless..\n");
|
debug("Unsupported OS image.. Jumping nevertheless..\n");
|
||||||
}
|
}
|
||||||
#if CONFIG_VAL(SYS_MALLOC_F_LEN) && !defined(CONFIG_SYS_SPL_MALLOC_SIZE)
|
#if CONFIG_VAL(SYS_MALLOC_F_LEN) && !defined(CONFIG_SYS_SPL_MALLOC_SIZE)
|
||||||
debug("SPL malloc() used %#lx bytes (%ld KB)\n", gd->malloc_ptr,
|
debug("SPL malloc() used 0x%lx bytes (%ld KB)\n", gd->malloc_ptr,
|
||||||
gd->malloc_ptr / 1024);
|
gd->malloc_ptr / 1024);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_BOOTSTAGE_STASH
|
#ifdef CONFIG_BOOTSTAGE_STASH
|
||||||
|
|
Loading…
Add table
Reference in a new issue