blob: 30eb72bfd03d9c2932717828309476a8e8b5b321 [file] [log] [blame]
Masahisa Kojima1b2c5892022-09-12 17:33:58 +09001.. SPDX-License-Identifier: GPL-2.0+
2.. (C) Copyright 2022, Masahisa Kojima <masahisa.kojima@linaro.org>
3
4eficonfig command
5=================
6
7Synopsis
8--------
9::
10
11 eficonfig
12
13Description
14-----------
15
Masahisa Kojima30124c22022-12-02 13:59:37 +090016The "eficonfig" command uses the U-Boot menu interface to provide a
17menu-driven UEFI variable maintenance feature. These are the top level menu
18entries:
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090019
20Add Boot Option
Masahisa Kojima30124c22022-12-02 13:59:37 +090021 Add a new UEFI Boot Option.
22 The user can edit description, file path, and optional_data.
23 The new boot opiton is appended to the boot order in the *BootOrder*
24 variable. The user may want to update the boot order using the
25 *Change Boot Order* menu entry.
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090026
27Edit Boot Option
Masahisa Kojima30124c22022-12-02 13:59:37 +090028 Edit an existing UEFI Boot Option.
29 The User can edit description, file path, and optional_data.
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090030
31Change Boot Order
Masahisa Kojima30124c22022-12-02 13:59:37 +090032 Change the boot order updating the UEFI BootOrder variable.
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090033
34Delete Boot Option
Masahisa Kojima30124c22022-12-02 13:59:37 +090035 Delete a UEFI Boot Option
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090036
Masahisa Kojima30124c22022-12-02 13:59:37 +090037Secure Boot Configuration
38 Edit the UEFI Secure Boot Configuration
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090039
Masahisa Kojima30124c22022-12-02 13:59:37 +090040How to boot the system with a newly added UEFI Boot Option
41''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090042
Masahisa Kojima30124c22022-12-02 13:59:37 +090043The "eficonfig" command is used to set the UEFI boot options which are stored
44in the UEFI variable Boot#### where #### is a hexadecimal number.
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090045
Masahisa Kojima30124c22022-12-02 13:59:37 +090046The command *bootefi bootmgr* can be used to boot by trying in sequence all
47boot options selected by the variable *BootOrder*.
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090048
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090049If the bootmenu is enabled, CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is enabled,
50and "eficonfig" is configured as preboot command, the newly added Boot Options
Masahisa Kojima30124c22022-12-02 13:59:37 +090051are enumerated in the bootmenu when the user exits from the eficonfig menu.
52The user may select the entry in the bootmenu to boot the system, or follow
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090053the U-Boot configuration the system already has.
54
55Auto boot with the UEFI Boot Option
56'''''''''''''''''''''''''''''''''''
57
58To do auto boot according to the UEFI BootOrder variable,
59add "bootefi bootmgr" entry as a default or first bootmenu entry::
60
61 CONFIG_PREBOOT="setenv bootmenu_0 UEFI Boot Manager=bootefi bootmgr; setenv bootmenu_1 UEFI Maintenance Menu=eficonfig"
62
Masahisa Kojima30124c22022-12-02 13:59:37 +090063UEFI Secure Boot Configuration
64''''''''''''''''''''''''''''''
65
66The user can enroll the variables PK, KEK, db and dbx by selecting a file.
67The "eficonfig" command only accepts signed EFI Signature List(s) with an
68authenticated header, typically a ".auth" file.
69
70To clear the PK, KEK, db and dbx, the user needs to enroll a null value
71signed by PK or KEK.
72
73Configuration
74-------------
75
76The "eficonfig" command is enabled by::
77
78 CONFIG_CMD_EFICONFIG=y
79
80If CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is enabled, the user can not enter
81U-Boot console. In this case, the bootmenu can be used to invoke "eficonfig"::
82
83 CONFIG_USE_PREBOOT=y
84 CONFIG_PREBOOT="setenv bootmenu_0 UEFI Maintenance Menu=eficonfig"
85
86The only way U-Boot can currently store EFI variables on a tamper
87resistant medium is via OP-TEE. The Kconfig option that enables that is::
88
89 CONFIG_EFI_MM_COMM_TEE=y.
90
91It enables storing EFI variables on the RPMB partition of an eMMC device.
92
93The UEFI Secure Boot Configuration menu entry is only available if the following
94options are enabled::
95
96 CONFIG_EFI_SECURE_BOOT=y
97 CONFIG_EFI_MM_COMM_TEE=y
98
Masahisa Kojima1b2c5892022-09-12 17:33:58 +090099See also
100--------
Masahisa Kojima30124c22022-12-02 13:59:37 +0900101
102* :doc:`bootmenu<bootmenu>` provides a simple mechanism for creating menus with
103 different boot items