[PATCH 1/3] efi_loader: print boot device and file path in helloworld

Heinrich Schuchardt xypron.glpk at gmx.de
Fri Jan 15 13:02:51 CET 2021


On 15.01.21 05:29, AKASHI Takahiro wrote:
> On Fri, Jan 15, 2021 at 04:12:18AM +0100, Heinrich Schuchardt wrote:
>> Am 15. Januar 2021 02:56:03 MEZ schrieb AKASHI Takahiro <takahiro.akashi at linaro.org>:
>>> Heinrich,
>>>
>>> On Tue, Jan 12, 2021 at 08:58:40PM +0100, Heinrich Schuchardt wrote:
>>>> Let helloworld.efi print the device path of the boot device and the
>>> file
>>>> path as provided by the loaded image protocol.
>>>>
>>>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>>>> ---
>>>>  lib/efi_loader/helloworld.c | 167
>>> +++++++++++++++++++++++++++++-------

<snip />

>>>
>>> If this kind of information is quite useful for users, why not add
>>> that (printing) feature as an option of bootefi (or efidebug)?
>>> I'm afraid that most users who are irritated as you said won't be able
>>> to imagine such information be printed by helloworld app.
>>>
>>
>> The file path is written in
>>
>> https://github.com/trini/u-boot/blob/master/cmd/bootefi.c#L471
>>
>> Device paths are not really user friendly.
>
> So why do you want to print such info at helloworld?
>
> I guess that, according to your cover letter, you have in your mind
> some cases where an user may get in trouble relating to the boot device.
> Right?
>
>> So I would not like to write it there.
>
> What I meant to suggest is to add an option, -v or -h, to bootefi,
> which prints verbose (and helpful) information for users to identify a cause.
> I can easily imagine users may blindly try to add -[v|h] when
> they see an error message even if they don't know there is such an option:)

To me helloworld.efi is a tool for a developer to see if an EFI binary
is correctly invoked.

The normal U-Boot code we want to keep as slim as possible.

According to the spec UEFI boots from the ESP and typically there is
only one. So printing the file path in cmd/bootefi should be enough.

Best regards

Heinrich


More information about the U-Boot mailing list