[PATCH v3 3/3] eficonfig: add vertical scroll support

Heinrich Schuchardt xypron.glpk at gmx.de
Sat Jan 14 11:26:09 CET 2023


On 1/14/23 11:06, Heinrich Schuchardt wrote:
> On 1/5/23 03:58, Masahisa Kojima wrote:
>> The current eficonfig menu does not support vertical scroll,
>> so it can not display the menu entries greater than
>> the console row size.
>>
>> This commit add the vertial scroll support.
>> The console size is retrieved by
>> SIMPLE_TEXT_OUTPUT_PROTOCOL.QueryMode() service, then
>> calculates the row size for menu entry by subtracting
>> menu header and description row size from the console row size.
>> "start" and "end" are added in the efimenu structure.
>> "start" keeps the menu entry index at the top, "end" keeps
>> the bottom menu entry index. item_data_print() menu function
>> only draws the menu entry between "start" and "end".
>>
>> Signed-off-by: Masahisa Kojima <masahisa.kojima at linaro.org>
>
> Hello Masahisa,
>
> unfortunately this does not work.
>
> I create a boot.scr script to create 100 boot options:
>
> #!/bin/bash
> a=0
> while [ $a -lt 100 ]; do
> b="0000$a"
> c=${b: -4}
> echo "efidebug boot add -b $c label$c host 0:1 dtbdump.efi" >> boot.txt
> a=$(( $a + 1 ))
> done
> mkimage -T script -n foo -d boot.txt boot.scr
> rm boot.txt
>
> In sandbox_defconfig:
>
> host bind 0 ../sandbox.img
> host load 0:1 $kernel_addr_r boot.scr
> source $kernel_addr_r
> efidebug boot dump
>
> Now I have 100 boot options.
>
> I start 'eficonfig'. Whenever I push the up or down key this immediately
> leads to exiting the command and I am back at the console prompt.
>
> Best regards
>
> Heinrich
>

The problem seems to be that the space for variables is exhausted.
The user should see an error message in this case.

With CONFIG_EFI_VAR_BUF_SIZE=65536 the navigation works but I only see
entries label0000 - label0095. Where are the other entries?

I have been adding CONFIG_LEGACY_IMAGE_FORMAT=y to read the boot.scr file.

Best regards

Heinrich


More information about the U-Boot mailing list