]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bootstd: Add debugging for efi bootmeth
authorSimon Glass <sjg@chromium.org>
Thu, 26 Sep 2024 21:59:37 +0000 (23:59 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 10 Oct 2024 04:04:56 +0000 (22:04 -0600)
Add a little debugging so we can see what is happening.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
boot/bootmeth_efi.c

index 6b41c0999f1cf7f067191ee68c56a2574b29ceb2..2ad6d3b4ace015c5eed9cff0279231848406e0e0 100644 (file)
@@ -162,8 +162,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);
@@ -171,8 +173,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("File '%s' not found\n", fname);
                return log_msg_ret("try", ret);
+       }
 
        /* Since we can access the file, let's call it ready */
        bflow->state = BOOTFLOWST_READY;
@@ -307,6 +311,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.
@@ -332,6 +338,7 @@ static int distro_efi_boot(struct udevice *dev, struct bootflow *bflow)
        ulong kernel, fdt;
        int ret;
 
+       log_debug("distro EFI boot\n");
        kernel = env_get_hex("kernel_addr_r", 0);
        if (!bootmeth_uses_network(bflow)) {
                ret = efiload_read_file(bflow, kernel);