eficonfig.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. .. SPDX-License-Identifier: GPL-2.0+
  2. .. (C) Copyright 2022, Masahisa Kojima <masahisa.kojima@linaro.org>
  3. eficonfig command
  4. =================
  5. Synopsis
  6. --------
  7. ::
  8. eficonfig
  9. Description
  10. -----------
  11. The "eficonfig" command uses the U-Boot menu interface to provide a
  12. menu-driven UEFI variable maintenance feature. These are the top level menu
  13. entries:
  14. Add Boot Option
  15. Add a new UEFI Boot Option.
  16. The user can edit description, file path, and optional_data.
  17. The new boot opiton is appended to the boot order in the *BootOrder*
  18. variable. The user may want to update the boot order using the
  19. *Change Boot Order* menu entry.
  20. Edit Boot Option
  21. Edit an existing UEFI Boot Option.
  22. The User can edit description, file path, and optional_data.
  23. Change Boot Order
  24. Change the boot order updating the UEFI BootOrder variable.
  25. Delete Boot Option
  26. Delete a UEFI Boot Option
  27. Secure Boot Configuration
  28. Edit the UEFI Secure Boot Configuration
  29. How to boot the system with a newly added UEFI Boot Option
  30. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  31. The "eficonfig" command is used to set the UEFI boot options which are stored
  32. in the UEFI variable Boot#### where #### is a hexadecimal number.
  33. The command *bootefi bootmgr* can be used to boot by trying in sequence all
  34. boot options selected by the variable *BootOrder*.
  35. If the bootmenu is enabled, CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is enabled,
  36. and "eficonfig" is configured as preboot command, the newly added Boot Options
  37. are enumerated in the bootmenu when the user exits from the eficonfig menu.
  38. The user may select the entry in the bootmenu to boot the system, or follow
  39. the U-Boot configuration the system already has.
  40. Auto boot with the UEFI Boot Option
  41. '''''''''''''''''''''''''''''''''''
  42. To do auto boot according to the UEFI BootOrder variable,
  43. add "bootefi bootmgr" entry as a default or first bootmenu entry::
  44. CONFIG_PREBOOT="setenv bootmenu_0 UEFI Boot Manager=bootefi bootmgr; setenv bootmenu_1 UEFI Maintenance Menu=eficonfig"
  45. UEFI Secure Boot Configuration
  46. ''''''''''''''''''''''''''''''
  47. The user can enroll the variables PK, KEK, db and dbx by selecting a file.
  48. The "eficonfig" command only accepts signed EFI Signature List(s) with an
  49. authenticated header, typically a ".auth" file.
  50. To clear the PK, KEK, db and dbx, the user needs to enroll a null value
  51. signed by PK or KEK.
  52. Configuration
  53. -------------
  54. The "eficonfig" command is enabled by::
  55. CONFIG_CMD_EFICONFIG=y
  56. If CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is enabled, the user can not enter
  57. U-Boot console. In this case, the bootmenu can be used to invoke "eficonfig"::
  58. CONFIG_USE_PREBOOT=y
  59. CONFIG_PREBOOT="setenv bootmenu_0 UEFI Maintenance Menu=eficonfig"
  60. The only way U-Boot can currently store EFI variables on a tamper
  61. resistant medium is via OP-TEE. The Kconfig option that enables that is::
  62. CONFIG_EFI_MM_COMM_TEE=y.
  63. It enables storing EFI variables on the RPMB partition of an eMMC device.
  64. The UEFI Secure Boot Configuration menu entry is only available if the following
  65. options are enabled::
  66. CONFIG_EFI_SECURE_BOOT=y
  67. CONFIG_EFI_MM_COMM_TEE=y
  68. See also
  69. --------
  70. * :doc:`bootmenu<bootmenu>` provides a simple mechanism for creating menus with
  71. different boot items