[PATCH] efi_loader: Print extra information from the bootmgr

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Apr 11 09:08:11 CEST 2025


On 3/28/25 13:58, Ilias Apalodimas wrote:
> Instead of just printing the label, add information for the Device
> path as well so it's easier to see if we are booting from disk, network
> etc
>
> Signed-off-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
> ---
>   lib/efi_loader/efi_bootmgr.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
> index f9534ef85edb..6b9d809ff618 100644
> --- a/lib/efi_loader/efi_bootmgr.c
> +++ b/lib/efi_loader/efi_bootmgr.c
> @@ -690,7 +690,7 @@ static efi_status_t try_load_entry(u16 n, efi_handle_t *handle,
>   			goto error;
>   	}
>
> -	log_info("Booting: %ls\n", lo.label);
> +	log_info("Booting: Label: %ls Device path: %pD\n", lo.label, lo.file_path);

I think we can remove "Label:" and but "Device path:" on a new line.

The output is truncated according to CONFIG_SYS_PBSIZE=276:

Booting: Label: nvme 0 Device path:
/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,0000000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,6d00000000000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,5500000002000000)/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b,550000000300

In this case the filename is not shown at all.

efi_dp_shorten() might help to provide a printable output.

But I don't believe that a non-developer would have a benefit from an
output like:

HD(2,GPT,54e58a03-c1db-4c6b-afda-24340c39cda5,0x109000,0x32000)\EFI\ubuntu\bootriscv64.efi)

I would not know the GUIDs for my partitions by heart.

Isn't log_debug() more adequate here?

Best regards

Heinrich

>
>   	/* Ignore the optional data in auto-generated boot options */
>   	if (size >= sizeof(efi_guid_t) &&



More information about the U-Boot mailing list