[U-Boot] [PATCH v3 1/8] cmd: add efishell command

Alexander Graf
2019-01-08T09:57:45Z

On 07.01.19 06:08, AKASHI Takahiro wrote:
> On Sun, Dec 30, 2018 at 06:10:51PM +0100, Heinrich Schuchardt wrote:
>> On 12/30/18 4:44 PM, Heinrich Schuchardt wrote:
>>> On 12/18/18 6:05 AM, AKASHI Takahiro wrote:
>>>> Currently, there is no easy way to add or modify UEFI variables.
>>>> In particular, bootmgr supports BootOrder/BootXXXX variables, it is
>>>> quite hard to define them as u-boot variables because they are represented
>>>> in a complicated and encoded format.
>>>>
>>>> The new command, efishell, helps address these issues and give us
>>>> more friendly interfaces:
>>>> * efishell boot add: add BootXXXX variable
>>>> * efishell boot rm: remove BootXXXX variable
>>>> * efishell boot dump: display all BootXXXX variables
>>>> * efishell boot order: set/display a boot order (BootOrder)
>>>> * efishell setvar: set an UEFI variable (with limited functionality)
>>>> * efishell dumpvar: display all UEFI variables
>>>>
>>>> As the name suggests, this command basically provides a subset fo UEFI
>>>> shell commands with simplified functionality.
>>>>
>>>> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
>>
>> The behavior is a bit unexpected:
>>
>> => efishell boot order 200
>> => efishell boot order
>> 1: Boot00C8: (not defined)
>> exit not allowed from main input shell.
>>
>> I would expect 'efishell boot order' to take a 4 digit hexadecimal
>> number and to do no conversion from decimal to hexadecimal.
>
> OK, but we should allow a less-than-4-digit number.

Yes, but definitely stick to Hex regardless. Hex is the default number
space in U-Boot - and it just happens to fit quite well with the
variable definition too :).

Alex