[PATCH v4 09/14] bootstd: Add debugging for efi bootmeth
Ilias Apalodimas
ilias.apalodimas at linaro.org
Mon Aug 26 13:13:32 CEST 2024
On Thu, 15 Aug 2024 at 23:24, Simon Glass <sjg at chromium.org> wrote:
>
> Add a little debugging so we can see what is happening.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
> boot/bootmeth_efi.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c
> index 39232eb2e25..99887a89f02 100644
> --- a/boot/bootmeth_efi.c
> +++ b/boot/bootmeth_efi.c
> @@ -163,8 +163,10 @@ static int distro_efi_try_bootflow_files(struct udevice *dev,
> int ret, seq;
>
> /* We require a partition table */
> - if (!bflow->part)
> + if (!bflow->part) {
> + log_debug("no partitions\n");
> return -ENOENT;
> + }
>
> strcpy(fname, EFI_DIRNAME);
> strcat(fname, BOOTEFI_NAME);
> @@ -172,8 +174,10 @@ static int distro_efi_try_bootflow_files(struct udevice *dev,
> if (bflow->blk)
> desc = dev_get_uclass_plat(bflow->blk);
> ret = bootmeth_try_file(bflow, desc, NULL, fname);
> - if (ret)
> + if (ret) {
> + log_debug("no file\n");
> return log_msg_ret("try", ret);
> + }
>
> /* Since we can access the file, let's call it ready */
> bflow->state = BOOTFLOWST_READY;
> @@ -308,6 +312,8 @@ static int distro_efi_read_bootflow(struct udevice *dev, struct bootflow *bflow)
> {
> int ret;
>
> + log_debug("dev='%s', part=%d\n", bflow->dev->name, bflow->part);
> +
> /*
> * bootmeth_efi doesn't allocate any buffer neither for blk nor net device
> * set flag to avoid freeing static buffer.
> @@ -333,6 +339,7 @@ static int distro_efi_boot(struct udevice *dev, struct bootflow *bflow)
> ulong kernel, fdt;
> int ret;
>
> + log_debug("boot\n");
> kernel = env_get_hex("kernel_addr_r", 0);
> if (!bootmeth_uses_network(bflow)) {
> ret = efiload_read_file(bflow, kernel);
> --
> 2.34.1
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list