[PATCH master 5/5] efi: payload: align kernel boot status messages
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Nov 7 06:17:22 PST 2025
To make debugging easier, let's explicitly call out if StartImage or
handover is used and on stdout as we do for other architectures.
While at it, we also skip printing the options if they are <NULL>.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
efi/payload/handover.c | 5 +++--
efi/payload/image.c | 6 ++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/efi/payload/handover.c b/efi/payload/handover.c
index 12fd6d95c2e8..f549568b6d03 100644
--- a/efi/payload/handover.c
+++ b/efi/payload/handover.c
@@ -103,13 +103,14 @@ static int do_bootm_efi(struct image_data *data)
boot_header->code32_start = efi_virt_to_phys(loaded_image->image_base +
(image_header->setup_sects+1) * 512);
+ printf("Booting kernel via handover");
if (bootm_verbose(data)) {
- printf("\nStarting kernel at 0x%p", loaded_image->image_base);
+ printf("at 0x%p", loaded_image->image_base);
if (data->initrd_file)
printf(", initrd at 0x%08x",
boot_header->ramdisk_image);
- printf("...\n");
}
+ printf("...\n");
if (data->dryrun) {
BS->unload_image(handle);
diff --git a/efi/payload/image.c b/efi/payload/image.c
index ea6033edc363..22ff5d27ced6 100644
--- a/efi/payload/image.c
+++ b/efi/payload/image.c
@@ -119,14 +119,16 @@ int efi_execute_image(efi_handle_t handle,
(loaded_image->image_code_type == EFI_RUNTIME_SERVICES_CODE);
if (is_linux_image(filetype, loaded_image->image_base)) {
- pr_debug("Linux kernel detected. Adding bootargs.");
options = linux_bootargs_get();
- pr_info("add linux options '%s'\n", options);
+ printf("Booting kernel via StartImage");
if (options) {
+ printf("with options '%s'", options);
loaded_image->load_options = xstrdup_char_to_wchar(options);
loaded_image->load_options_size =
(strlen(options) + 1) * sizeof(wchar_t);
}
+ printf("...\n");
+
shutdown_barebox();
}
--
2.47.3
More information about the barebox
mailing list