Caleb Connolly | 5dd1732 | 2025-03-31 14:23:18 +0200 | [diff] [blame^] | 1 | bootdelay=0 |
| 2 | bootretry=1 |
| 3 | stdin=serial,button-kbd |
| 4 | stdout=serial,vidconsole |
| 5 | stderr=serial,vidconsole |
| 6 | |
| 7 | # Fastboot is keen to use the address from kconfig, but we |
| 8 | # allocate its buffer at runtime. |
| 9 | fastboot=fastboot -l $fastboot_addr_r usb 0 |
| 10 | |
| 11 | # Always probe for UFS storage, though it should be done by board code. |
| 12 | preboot=scsi scan |
| 13 | |
| 14 | # Shortcut to enable USB serial gadget and disable bootretry |
| 15 | serial_gadget=setenv stdin serial,button-kbd,usbacm; \ |
| 16 | setenv stdout serial,vidconsole,usbacm; \ |
| 17 | setenv stderr serial,vidconsole,usbacm; \ |
| 18 | setenv bootretry -1; \ |
| 19 | echo Enabled U-Boot console serial gadget |
| 20 | |
| 21 | # bootretry will run this command over and over, if we fail once |
| 22 | # then bail out to the boot menu instead (with a pause to read |
| 23 | # the error message) |
| 24 | bootcmd=bootefi bootmgr; pause; run menucmd |
| 25 | |
| 26 | # When entering the menu (either from button press or failed boot) |
| 27 | # remap bootcmd so it will re-open the menu and we won't get stuck |
| 28 | # at the console with no way to type |
| 29 | menucmd=setenv bootcmd run menucmd; bootmenu -1 |
| 30 | |
| 31 | # Pause is used so the output can be read on the display |
| 32 | bootmenu_0=Boot=bootefi bootmgr; pause |
| 33 | bootmenu_1=Enable serial console gadget=run serial_gadget |
| 34 | bootmenu_2=Enable USB mass storage=echo "Press any key to exit UMS mode"; ums 0 scsi 0 |
| 35 | bootmenu_3=Enable fastboot mode=run fastboot |
| 36 | # Disabling bootretry means we'll just drop the shell |
| 37 | bootmenu_4=Drop to shell=setenv bootretry -1 |
| 38 | bootmenu_5=Reset device=reset |
| 39 | bootmenu_6=Dump clocks=clk dump; pause |
| 40 | bootmenu_7=Dump environment=printenv; pause |
| 41 | bootmenu_8=Board info=bdinfo; pause |
| 42 | bootmenu_9=Dump bootargs=fdt print /chosen bootargs; pause |
| 43 | |
| 44 | # Allow holding the volume down button while U-Boot loads to enter |
| 45 | # the boot menu |
| 46 | button_cmd_0_name=Volume Down |
| 47 | button_cmd_0=run menucmd |