Kconfig.projbuild 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. menu "Bootloader config"
  2. choice LOG_BOOTLOADER_LEVEL
  3. bool "Bootloader log verbosity"
  4. default LOG_BOOTLOADER_LEVEL_WARN
  5. help
  6. Specify how much output to see in bootloader logs.
  7. config LOG_BOOTLOADER_LEVEL_NONE
  8. bool "No output"
  9. config LOG_BOOTLOADER_LEVEL_ERROR
  10. bool "Error"
  11. config LOG_BOOTLOADER_LEVEL_WARN
  12. bool "Warning"
  13. config LOG_BOOTLOADER_LEVEL_INFO
  14. bool "Info"
  15. config LOG_BOOTLOADER_LEVEL_DEBUG
  16. bool "Debug"
  17. config LOG_BOOTLOADER_LEVEL_VERBOSE
  18. bool "Verbose"
  19. endchoice
  20. config LOG_BOOTLOADER_LEVEL
  21. int
  22. default 0 if LOG_BOOTLOADER_LEVEL_NONE
  23. default 1 if LOG_BOOTLOADER_LEVEL_ERROR
  24. default 2 if LOG_BOOTLOADER_LEVEL_WARN
  25. default 3 if LOG_BOOTLOADER_LEVEL_INFO
  26. default 4 if LOG_BOOTLOADER_LEVEL_DEBUG
  27. default 5 if LOG_BOOTLOADER_LEVEL_VERBOSE
  28. endmenu
  29. menu "Secure boot configuration"
  30. choice SECURE_BOOTLOADER
  31. bool "Secure bootloader"
  32. default SECURE_BOOTLOADER_DISABLED
  33. help
  34. Build a bootloader with the secure boot flag enabled.
  35. Secure bootloader can be one-time-flash (chip will only ever
  36. boot that particular bootloader), or a digest key can be used
  37. to allow the secure bootloader to be re-flashed with
  38. modifications. Secure boot also permanently disables JTAG.
  39. See docs/security/secure-boot.rst for details.
  40. config SECURE_BOOTLOADER_DISABLED
  41. bool "Disabled"
  42. config SECURE_BOOTLOADER_ONE_TIME_FLASH
  43. bool "One-time flash"
  44. help
  45. On first boot, the bootloader will generate a key which is not readable externally or by software. A digest is generated from the bootloader image itself. This digest will be verified on each subsequent boot.
  46. Enabling this option means that the bootloader cannot be changed after the first time it is booted.
  47. config SECURE_BOOTLOADER_REFLASHABLE
  48. bool "Reflashable"
  49. help
  50. Generate a reusable secure bootloader key, derived (via SHA-256) from the secure boot signing key.
  51. This allows the secure bootloader to be re-flashed by anyone with access to the secure boot signing key.
  52. This option is less secure than one-time flash, because a leak of the digest key from one device allows reflashing of any device that uses it.
  53. endchoice
  54. config SECURE_BOOT_SIGNING_KEY
  55. string "Secure boot signing key"
  56. depends on SECURE_BOOTLOADER_ENABLED
  57. default secure_boot_signing_key.pem
  58. help
  59. Path to the key file used to sign partition tables and app images for secure boot.
  60. Key file is an ECDSA private key (NIST256p curve) in PEM format.
  61. Path is evaluated relative to the project directory.
  62. You can generate a new signing key by running the following command:
  63. espsecure.py generate_signing_key secure_boot_signing_key.pem
  64. See docs/security/secure-boot.rst for details.
  65. config SECURE_BOOT_DISABLE_JTAG
  66. bool "First boot: Permanently disable JTAG"
  67. depends on SECURE_BOOTLOADER_ENABLED
  68. default Y
  69. help
  70. Bootloader permanently disable JTAG (across entire chip) when enabling secure boot. This happens on first boot of the bootloader.
  71. It is recommended this option remains set for production environments.
  72. config SECURE_BOOT_DISABLE_ROM_BASIC
  73. bool "First boot: Permanently disable ROM BASIC fallback"
  74. depends on SECURE_BOOTLOADER_ENABLED
  75. default Y
  76. help
  77. Bootloader permanently disables ROM BASIC (on UART console) as a fallback if the bootloader image becomes invalid. This happens on first boot.
  78. It is recommended this option remains set in production environments.
  79. config SECURE_BOOT_TEST_MODE
  80. bool "Test mode: don't actually enable secure boot"
  81. depends on SECURE_BOOTLOADER_ENABLED
  82. default N
  83. help
  84. If this option is set, all permanent secure boot changes (via Efuse) are disabled.
  85. This option is for testing purposes only - it effectively completely disables secure boot protection.
  86. config SECURE_BOOTLOADER_ENABLED
  87. bool
  88. default SECURE_BOOTLOADER_ONE_TIME_FLASH || SECURE_BOOTLOADER_REFLASHABLE
  89. endmenu