[PATCH] xilinx: zynqmp: Add bootmenu support
Michal Simek
michal.simek at amd.com
Mon Sep 16 13:49:39 CEST 2024
On 9/12/24 03:00, Simon Glass wrote:
> Hi Michal,
>
> On Wed, 11 Sept 2024 at 02:04, Michal Simek <michal.simek at amd.com> wrote:
>>
>> From: John Vicky Vykuntapu <johnvicky.vykuntapu at amd.com>
>>
>> Popup the bootmenu for 5 sec with default boot options to CC on AMD CCs and
>> default to SOM on others.
>> Users can anytime disable the bootmenu by setting the variable
>> enable_bootmenu=0 in zynqmp_kria.env or setup it up at run time and save
>> variables to NV memory.
>>
>> The patch is also fixing issue created by commit 4c7363068651 ("cmd:
>> setexpr: fix no matching string in gsub return empty value") which has
>> changed return value from setexpr command (Before this commit when
>> matching string wasn't found command return 1 that's why was possible to
>> use with if).
>>
>> Signed-off-by: John Vicky Vykuntapu <johnvicky.vykuntapu at amd.com>
>> Signed-off-by: Michal Simek <michal.simek at amd.com>
>> ---
>>
>> board/xilinx/zynqmp/zynqmp_kria.env | 12 +++++++++++-
>> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> Can this use standard boot? For example 'bootflow scan -lb mmc' ?
We didn't switch to it yet.
>>
>> diff --git a/board/xilinx/zynqmp/zynqmp_kria.env b/board/xilinx/zynqmp/zynqmp_kria.env
>> index 49ef3e7d7532..d0e431ebb46f 100644
>> --- a/board/xilinx/zynqmp/zynqmp_kria.env
>> +++ b/board/xilinx/zynqmp/zynqmp_kria.env
>> @@ -49,9 +49,19 @@ usb_boot_devices='usb0 usb1 usb2 usb3 usb4'
>> som_cc_boot=if test ${card1_name} = SCK-KV-G; then setenv boot_targets mmc1 ${usb_boot_devices} pxe dhcp jtag && run distro_bootcmd; elif test ${card1_name} = SCK-KR-G; then setenv boot_targets ${usb_boot_devices} pxe dhcp jtag && run distro_bootcmd; else test ${card1_name} = SCK-KD-G; setenv boot_targets ${usb_boot_devices} pxe dhcp jtag && run distro_bootcmd; fi;"
>> som_mmc_boot=setenv boot_targets mmc0 && run distro_bootcmd
>>
>> +# To disable bootmenu set enable_bootmenu=0
>> +enable_bootmenu=1
>> +check_cc_for_default_boot=if test ${card1_name} = SCK-KV-G || test ${card1_name} = SCK-KR-G || test ${card1_name} = SCK-KD-G; then setenv bootmenu_default 1; else setenv bootmenu_default 0; fi
>> +som_bootmenu=if test ${enable_bootmenu} = 1; then run check_cc_for_default_boot; bootmenu; else run som_mmc_boot; fi
>> +
>> k26_starter=SMK-K26-XCL2G
>> k24_starter=SMK-K24-XCL2G
>> -bootcmd=setenv model $board_name && if setexpr model gsub .*$k24_starter* $k24_starter || setexpr model gsub .*$k26_starter* $k26_starter; then run som_cc_boot; else run som_mmc_boot; run som_cc_boot; fi
>> +bootcmd=setenv model $board_name; setexpr model gsub ".*${k24_starter}.*" starter; setexpr model gsub ".*${k26_starter}.*" starter; if test ${model} = "starter"; then run som_cc_boot; else run som_bootmenu; fi
>> +
>> +# Boot menu
>> +bootmenu_0=eMMC Boot=run som_mmc_boot
>> +bootmenu_1=SD Boot=run som_cc_boot
>
> Would bootstd find these automatically?
It will add them as targets but without specifying which mmc controller is SD
and which one is EMMC.
I pretty much think that we should look what would be the best way to move to
bootflows and how to do scan for some devices. Because I can't see support for
NAND, JTAG(ram) and also dfu/thor.
Thanks,
Michal
More information about the U-Boot
mailing list