summaryrefslogtreecommitdiff
path: root/doc/usage
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-10-03 22:39:46 +0300
committerTom Rini <trini@konsulko.com>2022-10-03 22:39:46 +0300
commit2d4591353452638132d711551fec3495b7644731 (patch)
treee12058de7f553e84f8d13e545f130c7a48973589 /doc/usage
parent4debc57a3da6c3f4d3f89a637e99206f4cea0a96 (diff)
parent6ee6e15975cad3c99fad3a66223f3fd9287a369b (diff)
downloadu-boot-2d4591353452638132d711551fec3495b7644731.tar.xz
Merge branch 'next'
Diffstat (limited to 'doc/usage')
-rw-r--r--doc/usage/cmd/bootmenu.rst74
-rw-r--r--doc/usage/cmd/cyclic.rst45
-rw-r--r--doc/usage/cmd/eficonfig.rst71
-rw-r--r--doc/usage/cmd/loady.rst7
-rw-r--r--doc/usage/cmd/pause.rst53
-rw-r--r--doc/usage/index.rst3
-rw-r--r--doc/usage/partitions.rst2
7 files changed, 254 insertions, 1 deletions
diff --git a/doc/usage/cmd/bootmenu.rst b/doc/usage/cmd/bootmenu.rst
index 9430f8c9aa..cb3c8d2f93 100644
--- a/doc/usage/cmd/bootmenu.rst
+++ b/doc/usage/cmd/bootmenu.rst
@@ -4,6 +4,15 @@
bootmenu command
================
+Synopsis
+--------
+::
+
+ bootmenu [delay]
+
+Description
+-----------
+
The "bootmenu" command uses U-Boot menu interfaces and provides
a simple mechanism for creating menus with different boot items.
The cursor keys "Up" and "Down" are used for navigation through
@@ -79,6 +88,55 @@ The above example will be rendered as below::
The selected menu entry will be highlighted - it will have inverted
background and text colors.
+UEFI boot variable enumeration
+''''''''''''''''''''''''''''''
+If enabled, the bootmenu command will automatically generate and add
+UEFI-related boot menu entries for the following items.
+
+ * possible bootable media with default file names
+ * user-defined UEFI boot options
+
+The bootmenu automatically enumerates the possible bootable
+media devices supporting EFI_SIMPLE_FILE_SYSTEM_PROTOCOL.
+This auto generated entry is named as "<interface> <devnum>:<part>" format.
+(e.g. "usb 0:1")
+
+The bootmenu displays the UEFI-related menu entries in order of "BootOrder".
+When the user selects the UEFI boot menu entry, the bootmenu sets
+the selected boot variable index to "BootNext" without non-volatile attribute,
+then call the uefi boot manager with the command "bootefi bootmgr".
+
+Example bootmenu is as below::
+
+ *** U-Boot Boot Menu ***
+
+ mmc 0:1
+ mmc 0:2
+ debian
+ nvme 0:1
+ ubuntu
+ nvme 0:2
+ usb 0:2
+ U-Boot console
+
+Default behavior when user exits from the bootmenu
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+User can exit from bootmenu by selecting the last entry
+"U-Boot console"/"Quit" or ESC/CTRL+C key.
+
+When the CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is disabled,
+user exits from the bootmenu and returns to the U-Boot console.
+
+When the CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is enabled, user can not
+enter the U-Boot console. When the user exits from the bootmenu,
+the bootmenu invokes the following default behavior.
+
+ * if CONFIG_CMD_BOOTEFI_BOOTMGR is enabled, execute "bootefi bootmgr" command
+ * "bootefi bootmgr" fails or is not enabled, then execute "run bootcmd" command.
+
+Configuration
+-------------
+
The "bootmenu" command is enabled by::
CONFIG_CMD_BOOTMENU=y
@@ -88,3 +146,19 @@ To run the bootmenu at startup add these additional settings::
CONFIG_AUTOBOOT_KEYED=y
CONFIG_BOOTDELAY=30
CONFIG_AUTOBOOT_MENU_SHOW=y
+
+UEFI boot variable enumeration is enabled by::
+
+ CONFIG_CMD_BOOTEFI_BOOTMGR=y
+
+To improve the product security, entering U-Boot console from bootmenu
+can be disabled by::
+
+ CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE=y
+
+To scan the discoverable devices connected to the buses such as
+USB and PCIe prior to bootmenu showing up, CONFIG_PREBOOT can be
+used to run the command before showing the bootmenu, i.e.::
+
+ CONFIG_USE_PREBOOT=y
+ CONFIG_PREBOOT="pci enum; usb start; scsi scan; nvme scan; virtio scan"
diff --git a/doc/usage/cmd/cyclic.rst b/doc/usage/cmd/cyclic.rst
new file mode 100644
index 0000000000..3085cc7204
--- /dev/null
+++ b/doc/usage/cmd/cyclic.rst
@@ -0,0 +1,45 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+cyclic command
+==============
+
+Synopsis
+--------
+
+::
+
+ cyclic list
+
+Description
+-----------
+
+The cyclic list command provides a list of the currently registered
+cyclic functions.
+
+This shows the following information:
+
+Function
+ Function name
+
+cpu-time
+ Total time spent in this cyclic function.
+
+Frequency
+ Frequency of execution of this function, e.g. 100 times/s for a
+ pediod of 10ms.
+
+
+See :doc:`../../develop/cyclic` for more information on cyclic functions.
+
+Example
+-------
+
+::
+
+ => cyclic list
+ function: cyclic_demo, cpu-time: 52906 us, frequency: 99.20 times/s
+
+Configuration
+-------------
+
+The cyclic command is only available if CONFIG_CMD_CYCLIC=y.
diff --git a/doc/usage/cmd/eficonfig.rst b/doc/usage/cmd/eficonfig.rst
new file mode 100644
index 0000000000..340ebc80db
--- /dev/null
+++ b/doc/usage/cmd/eficonfig.rst
@@ -0,0 +1,71 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. (C) Copyright 2022, Masahisa Kojima <masahisa.kojima@linaro.org>
+
+eficonfig command
+=================
+
+Synopsis
+--------
+::
+
+ eficonfig
+
+Description
+-----------
+
+The "eficonfig" command uses U-Boot menu interface and provides
+a menu-driven UEFI variable maintenance feature.
+The "eficonfig" has the following menu entries.
+
+Add Boot Option
+ Add new UEFI Boot Option.
+ User can edit description, file path, and optional_data.
+
+Edit Boot Option
+ Edit the existing UEFI Boot Option
+ User can edit description, file path, and optional_data.
+
+Change Boot Order
+ Change the order of UEFI BootOrder variable.
+
+Delete Boot Option
+ Delete the UEFI Boot Option
+
+Configuration
+-------------
+
+The "eficonfig" command is enabled by::
+
+ CONFIG_CMD_EFICONFIG=y
+
+If CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is enabled, user can not enter
+U-Boot console. In this case, bootmenu can be used to invoke "eficonfig"::
+
+ CONFIG_USE_PREBOOT=y
+ CONFIG_PREBOOT="setenv bootmenu_0 UEFI Maintenance Menu=eficonfig"
+
+How to boot the system with newly added UEFI Boot Option
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+"eficonfig" command is responsible for configuring the UEFI variables,
+not directly handle the system boot.
+The new Boot Option added by "eficonfig" is appended at the last entry
+of UEFI BootOrder variable, user may want to change the boot order
+through "Change Boot Order".
+If the bootmenu is enabled, CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is enabled,
+and "eficonfig" is configured as preboot command, the newly added Boot Options
+are enumerated in the bootmenu when user exits from the eficonfig menu.
+User may select the entry in the bootmenu to boot the system, or follow
+the U-Boot configuration the system already has.
+
+Auto boot with the UEFI Boot Option
+'''''''''''''''''''''''''''''''''''
+
+To do auto boot according to the UEFI BootOrder variable,
+add "bootefi bootmgr" entry as a default or first bootmenu entry::
+
+ CONFIG_PREBOOT="setenv bootmenu_0 UEFI Boot Manager=bootefi bootmgr; setenv bootmenu_1 UEFI Maintenance Menu=eficonfig"
+
+See also
+--------
+* :doc:`bootmenu<bootmenu>` provides a simple mechanism for creating menus with different boot items
diff --git a/doc/usage/cmd/loady.rst b/doc/usage/cmd/loady.rst
index 2819cc72ae..718af6e128 100644
--- a/doc/usage/cmd/loady.rst
+++ b/doc/usage/cmd/loady.rst
@@ -61,6 +61,13 @@ Configuration
The command is only available if CONFIG_CMD_LOADB=y.
+Initial timeout in seconds while waiting for transfer is configured by
+config option CMD_LOADXY_TIMEOUT or by env variable $loadxy_timeout.
+Setting it to 0 means infinite timeout.
+
+Transfer can be cancelled by pressing 3 times <CTRL+C> after two seconds
+of inactivity on terminal.
+
Return value
------------
diff --git a/doc/usage/cmd/pause.rst b/doc/usage/cmd/pause.rst
new file mode 100644
index 0000000000..c79e399c02
--- /dev/null
+++ b/doc/usage/cmd/pause.rst
@@ -0,0 +1,53 @@
+.. SPDX-License-Identifier: GPL-2.0-or-later:
+
+pause command
+=============
+
+Synopsis
+--------
+
+::
+
+ pause [prompt]
+
+
+Description
+-----------
+
+The pause command delays execution waiting for any user input.
+
+It can accept a single parameter to change the prompt message.
+
+Examples
+--------
+
+Using with the default prompt:
+
+::
+
+ => pause
+ Press any key to continue...
+
+
+Using with a custom prompt:
+
+::
+
+ => pause 'Prompt for pause...'
+ Prompt for pause...
+
+Note that complex prompts require proper quoting:
+
+::
+
+ => pause Prompt for pause...
+ pause - delay until user input
+
+ Usage:
+ pause [prompt] - Wait until users presses any key. [prompt] can be used to customize the message.
+
+Return value
+------------
+
+The return value $? is always set to 0 (true), unless invoked in an invalid
+manner.
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index f1beeec59c..0fda121026 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -33,8 +33,10 @@ Shell commands
cmd/bootz
cmd/cbsysinfo
cmd/conitrace
+ cmd/cyclic
cmd/dm
cmd/echo
+ cmd/eficonfig
cmd/env
cmd/event
cmd/exception
@@ -52,6 +54,7 @@ Shell commands
cmd/mbr
cmd/md
cmd/mmc
+ cmd/pause
cmd/pinmux
cmd/printenv
cmd/pstore
diff --git a/doc/usage/partitions.rst b/doc/usage/partitions.rst
index 2c1a12b6bf..628469bbec 100644
--- a/doc/usage/partitions.rst
+++ b/doc/usage/partitions.rst
@@ -20,7 +20,7 @@ generic syntax.
interface
The interface used to access the partition's device, like ``mmc`` or
``scsi``. For a full list of supported interfaces, consult the
- ``if_typename_str`` array in ``drivers/block/blk-uclass.c``
+ ``uclass_idname_str`` array in ``drivers/block/blk-uclass.c``
devnum
The device number. This defaults to 0.