* [U-Boot] [PATCH v2] efi_loader: bootmgr: print a message when loading from BootNext failed
@ 2019-05-24 6:59 AKASHI Takahiro
2019-05-28 6:16 ` Heinrich Schuchardt
0 siblings, 1 reply; 3+ messages in thread
From: AKASHI Takahiro @ 2019-05-24 6:59 UTC (permalink / raw)
To: u-boot
If a user defines BootNext but not BootOrder and loading from BootNext
fails, you will see only a message like this:
BootOrder not defined
This may confuse a user. Adding an error message will be helpful.
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
Changes in v2 (May 24, 2019)
* add an error message to try_load_entry()
---
lib/efi_loader/efi_bootmgr.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index 7bf51874c1c1..bb66fee0a3d2 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -149,8 +149,10 @@ static efi_status_t try_load_entry(u16 n, efi_handle_t *handle)
ret = EFI_CALL(efi_load_image(true, efi_root, lo.file_path,
NULL, 0, handle));
- if (ret != EFI_SUCCESS)
+ if (ret != EFI_SUCCESS) {
+ printf("Loading from Boot%04X failed\n", n);
goto error;
+ }
attributes = EFI_VARIABLE_BOOTSERVICE_ACCESS |
EFI_VARIABLE_RUNTIME_ACCESS;
@@ -215,6 +217,8 @@ efi_status_t efi_bootmgr_load(efi_handle_t *handle)
ret = try_load_entry(bootnext, handle);
if (ret == EFI_SUCCESS)
return ret;
+ printf("Loading from Boot%04X failed, falling back into BootOrder...\n",
+ bootnext);
}
} else {
printf("Deleting BootNext failed\n");
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] efi_loader: bootmgr: print a message when loading from BootNext failed
2019-05-24 6:59 [U-Boot] [PATCH v2] efi_loader: bootmgr: print a message when loading from BootNext failed AKASHI Takahiro
@ 2019-05-28 6:16 ` Heinrich Schuchardt
2019-05-28 6:24 ` AKASHI Takahiro
0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2019-05-28 6:16 UTC (permalink / raw)
To: u-boot
On 5/24/19 8:59 AM, AKASHI Takahiro wrote:
> If a user defines BootNext but not BootOrder and loading from BootNext
> fails, you will see only a message like this:
> BootOrder not defined
>
> This may confuse a user. Adding an error message will be helpful.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> ---
> Changes in v2 (May 24, 2019)
> * add an error message to try_load_entry()
> ---
> lib/efi_loader/efi_bootmgr.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
> index 7bf51874c1c1..bb66fee0a3d2 100644
> --- a/lib/efi_loader/efi_bootmgr.c
> +++ b/lib/efi_loader/efi_bootmgr.c
> @@ -149,8 +149,10 @@ static efi_status_t try_load_entry(u16 n, efi_handle_t *handle)
>
> ret = EFI_CALL(efi_load_image(true, efi_root, lo.file_path,
> NULL, 0, handle));
> - if (ret != EFI_SUCCESS)
> + if (ret != EFI_SUCCESS) {
> + printf("Loading from Boot%04X failed\n", n);
> goto error;
> + }
>
> attributes = EFI_VARIABLE_BOOTSERVICE_ACCESS |
> EFI_VARIABLE_RUNTIME_ACCESS;
> @@ -215,6 +217,8 @@ efi_status_t efi_bootmgr_load(efi_handle_t *handle)
> ret = try_load_entry(bootnext, handle);
> if (ret == EFI_SUCCESS)
> return ret;
> + printf("Loading from Boot%04X failed, falling back into BootOrder...\n",
This is an example output:
=> bootefi bootmgr
Loading from Boot0004 failed
Loading from Boot0004 failed, falling back into BootOrder...
Loading from Boot0005 failed
Loading from Boot0003 failed
Loading from Boot0004 failed
EFI boot manager: Cannot load any image
"Loading from Boot0004 failed" appears twice in the beginning.
Either leave the message away or change it to
printf("Falling back into BootOrder...\n");
Best regards
Heinrich
> + bootnext);
> }
> } else {
> printf("Deleting BootNext failed\n");
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] efi_loader: bootmgr: print a message when loading from BootNext failed
2019-05-28 6:16 ` Heinrich Schuchardt
@ 2019-05-28 6:24 ` AKASHI Takahiro
0 siblings, 0 replies; 3+ messages in thread
From: AKASHI Takahiro @ 2019-05-28 6:24 UTC (permalink / raw)
To: u-boot
On Tue, May 28, 2019 at 08:16:37AM +0200, Heinrich Schuchardt wrote:
> On 5/24/19 8:59 AM, AKASHI Takahiro wrote:
> >If a user defines BootNext but not BootOrder and loading from BootNext
> >fails, you will see only a message like this:
> > BootOrder not defined
> >
> >This may confuse a user. Adding an error message will be helpful.
> >
> >Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> >---
> >Changes in v2 (May 24, 2019)
> >* add an error message to try_load_entry()
> >---
> > lib/efi_loader/efi_bootmgr.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> >diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
> >index 7bf51874c1c1..bb66fee0a3d2 100644
> >--- a/lib/efi_loader/efi_bootmgr.c
> >+++ b/lib/efi_loader/efi_bootmgr.c
> >@@ -149,8 +149,10 @@ static efi_status_t try_load_entry(u16 n, efi_handle_t *handle)
> >
> > ret = EFI_CALL(efi_load_image(true, efi_root, lo.file_path,
> > NULL, 0, handle));
> >- if (ret != EFI_SUCCESS)
> >+ if (ret != EFI_SUCCESS) {
> >+ printf("Loading from Boot%04X failed\n", n);
> > goto error;
> >+ }
> >
> > attributes = EFI_VARIABLE_BOOTSERVICE_ACCESS |
> > EFI_VARIABLE_RUNTIME_ACCESS;
> >@@ -215,6 +217,8 @@ efi_status_t efi_bootmgr_load(efi_handle_t *handle)
> > ret = try_load_entry(bootnext, handle);
> > if (ret == EFI_SUCCESS)
> > return ret;
> >+ printf("Loading from Boot%04X failed, falling back into BootOrder...\n",
>
> This is an example output:
>
> => bootefi bootmgr
> Loading from Boot0004 failed
> Loading from Boot0004 failed, falling back into BootOrder...
> Loading from Boot0005 failed
> Loading from Boot0003 failed
> Loading from Boot0004 failed
> EFI boot manager: Cannot load any image
>
> "Loading from Boot0004 failed" appears twice in the beginning.
>
> Either leave the message away or change it to
>
> printf("Falling back into BootOrder...\n");
Please make this change for me so that I don't have to send out
another patch?
Thanks,
-Takahiro Akashi
> Best regards
>
> Heinrich
>
> >+ bootnext);
> > }
> > } else {
> > printf("Deleting BootNext failed\n");
> >
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-05-28 6:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 6:59 [U-Boot] [PATCH v2] efi_loader: bootmgr: print a message when loading from BootNext failed AKASHI Takahiro
2019-05-28 6:16 ` Heinrich Schuchardt
2019-05-28 6:24 ` AKASHI Takahiro
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.