David Vincze | 03368b8 | 2020-04-01 12:53:53 +0200 | [diff] [blame] | 1 | # Copyright (c) 2017-2020 Linaro Limited |
David Vincze | c308413 | 2020-02-18 14:50:47 +0100 | [diff] [blame] | 2 | # Copyright (c) 2020 Arm Limited |
Andrzej Puzdrowski | 64ad092 | 2017-09-22 11:33:41 +0200 | [diff] [blame] | 3 | # |
| 4 | # SPDX-License-Identifier: Apache-2.0 |
| 5 | # |
| 6 | |
Marti Bolivar | 0e091c9 | 2018-04-12 11:23:16 -0400 | [diff] [blame] | 7 | mainmenu "MCUboot configuration" |
Andrzej Puzdrowski | 64ad092 | 2017-09-22 11:33:41 +0200 | [diff] [blame] | 8 | |
Marti Bolivar | 0e091c9 | 2018-04-12 11:23:16 -0400 | [diff] [blame] | 9 | comment "MCUboot-specific configuration options" |
Andrzej Puzdrowski | 64ad092 | 2017-09-22 11:33:41 +0200 | [diff] [blame] | 10 | |
Emanuele Di Santo | 865777d | 2018-11-08 11:28:15 +0100 | [diff] [blame] | 11 | # Hidden option to mark a project as MCUboot |
| 12 | config MCUBOOT |
| 13 | default y |
| 14 | bool |
Rajavardhan Gundi | 07ba28f | 2018-12-10 15:44:48 +0530 | [diff] [blame] | 15 | select MPU_ALLOW_FLASH_WRITE if ARM_MPU |
Marcin Niestroj | c6be76a | 2020-03-22 14:39:35 +0100 | [diff] [blame] | 16 | select USE_DT_CODE_PARTITION if HAS_FLASH_LOAD_OFFSET |
Andrzej Puzdrowski | f573b39 | 2020-11-10 14:35:15 +0100 | [diff] [blame] | 17 | select MCUBOOT_BOOTUTIL_LIB |
Emanuele Di Santo | 865777d | 2018-11-08 11:28:15 +0100 | [diff] [blame] | 18 | |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 19 | config BOOT_USE_MBEDTLS |
| 20 | bool |
| 21 | # Hidden option |
| 22 | default n |
| 23 | help |
| 24 | Use mbedTLS for crypto primitives. |
| 25 | |
| 26 | config BOOT_USE_TINYCRYPT |
| 27 | bool |
| 28 | # Hidden option |
| 29 | default n |
Sebastian Bøe | 913a385 | 2019-01-22 13:53:12 +0100 | [diff] [blame] | 30 | # When building for ECDSA, we use our own copy of mbedTLS, so the |
| 31 | # Zephyr one must not be enabled or the MBEDTLS_CONFIG_FILE macros |
| 32 | # will collide. |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 33 | help |
| 34 | Use TinyCrypt for crypto primitives. |
| 35 | |
Sigvart Hovland | ebd0503 | 2019-03-21 10:47:32 +0100 | [diff] [blame] | 36 | config BOOT_USE_CC310 |
| 37 | bool |
| 38 | # Hidden option |
| 39 | default n |
| 40 | # When building for ECDSA, we use our own copy of mbedTLS, so the |
| 41 | # Zephyr one must not be enabled or the MBEDTLS_CONFIG_FILE macros |
| 42 | # will collide. |
Sigvart Hovland | ebd0503 | 2019-03-21 10:47:32 +0100 | [diff] [blame] | 43 | help |
| 44 | Use cc310 for crypto primitives. |
| 45 | |
| 46 | config BOOT_USE_NRF_CC310_BL |
| 47 | bool |
| 48 | default n |
| 49 | |
| 50 | config NRFXLIB_CRYPTO |
| 51 | bool |
| 52 | default n |
| 53 | |
| 54 | config NRF_CC310_BL |
| 55 | bool |
| 56 | default n |
| 57 | |
Andrzej Puzdrowski | 9754328 | 2018-04-12 15:16:56 +0200 | [diff] [blame] | 58 | menu "MCUBoot settings" |
| 59 | |
Andrzej Puzdrowski | fdff3e1 | 2020-09-15 08:23:25 +0200 | [diff] [blame] | 60 | config SINGLE_APPLICATION_SLOT |
| 61 | bool "Single slot bootloader" |
Dominik Ermel | 4dc3f44 | 2020-05-26 08:45:14 +0000 | [diff] [blame] | 62 | default n |
| 63 | help |
| 64 | Single image area is used for application which means that |
| 65 | uploading a new application overwrites the one that previously |
| 66 | occupied the area. |
| 67 | |
Håkon Øye Amundsen | 21f0376 | 2021-11-12 08:21:31 +0000 | [diff] [blame] | 68 | choice BOOT_SIGNATURE_TYPE |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 69 | prompt "Signature type" |
| 70 | default BOOT_SIGNATURE_TYPE_RSA |
| 71 | |
Arvin Farahmand | fb5ec18 | 2020-05-05 11:44:12 -0400 | [diff] [blame] | 72 | config BOOT_SIGNATURE_TYPE_NONE |
| 73 | bool "No signature; use only hash check" |
| 74 | select BOOT_USE_TINYCRYPT |
| 75 | |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 76 | config BOOT_SIGNATURE_TYPE_RSA |
| 77 | bool "RSA signatures" |
| 78 | select BOOT_USE_MBEDTLS |
Marti Bolivar | a4818a5 | 2018-04-12 13:02:38 -0400 | [diff] [blame] | 79 | select MBEDTLS |
Jamie McCrae | 25d2f2c | 2023-07-17 14:17:53 +0100 | [diff] [blame] | 80 | select BOOT_ENCRYPTION_SUPPORT |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 81 | |
Fabio Utzig | 105b59a | 2019-05-13 15:08:12 -0700 | [diff] [blame] | 82 | if BOOT_SIGNATURE_TYPE_RSA |
| 83 | config BOOT_SIGNATURE_TYPE_RSA_LEN |
| 84 | int "RSA signature length" |
| 85 | range 2048 3072 |
| 86 | default 2048 |
| 87 | endif |
| 88 | |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 89 | config BOOT_SIGNATURE_TYPE_ECDSA_P256 |
| 90 | bool "Elliptic curve digital signatures with curve P-256" |
Jamie McCrae | 25d2f2c | 2023-07-17 14:17:53 +0100 | [diff] [blame] | 91 | select BOOT_ENCRYPTION_SUPPORT |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 92 | |
Sigvart Hovland | ebd0503 | 2019-03-21 10:47:32 +0100 | [diff] [blame] | 93 | if BOOT_SIGNATURE_TYPE_ECDSA_P256 |
Håkon Øye Amundsen | 21f0376 | 2021-11-12 08:21:31 +0000 | [diff] [blame] | 94 | choice BOOT_ECDSA_IMPLEMENTATION |
Sigvart Hovland | ebd0503 | 2019-03-21 10:47:32 +0100 | [diff] [blame] | 95 | prompt "Ecdsa implementation" |
Fabio Utzig | 34e93a5 | 2020-02-03 09:59:53 -0300 | [diff] [blame] | 96 | default BOOT_ECDSA_TINYCRYPT |
Håkon Øye Amundsen | ee7282d | 2020-09-28 09:48:29 +0000 | [diff] [blame] | 97 | |
Fabio Utzig | 34e93a5 | 2020-02-03 09:59:53 -0300 | [diff] [blame] | 98 | config BOOT_ECDSA_TINYCRYPT |
Sigvart Hovland | ebd0503 | 2019-03-21 10:47:32 +0100 | [diff] [blame] | 99 | bool "Use tinycrypt" |
| 100 | select BOOT_USE_TINYCRYPT |
Håkon Øye Amundsen | ee7282d | 2020-09-28 09:48:29 +0000 | [diff] [blame] | 101 | |
| 102 | config BOOT_ECDSA_CC310 |
Sigvart Hovland | ebd0503 | 2019-03-21 10:47:32 +0100 | [diff] [blame] | 103 | bool "Use CC310" |
Håkon Øye Amundsen | ee7282d | 2020-09-28 09:48:29 +0000 | [diff] [blame] | 104 | depends on HAS_HW_NRF_CC310 |
| 105 | select BOOT_USE_NRF_CC310_BL |
| 106 | select NRF_CC310_BL |
| 107 | select NRFXLIB_CRYPTO |
Sigvart Hovland | ebd0503 | 2019-03-21 10:47:32 +0100 | [diff] [blame] | 108 | select BOOT_USE_CC310 |
Håkon Øye Amundsen | ee7282d | 2020-09-28 09:48:29 +0000 | [diff] [blame] | 109 | endchoice # Ecdsa implementation |
Sigvart Hovland | ebd0503 | 2019-03-21 10:47:32 +0100 | [diff] [blame] | 110 | endif |
Fabio Utzig | 34e93a5 | 2020-02-03 09:59:53 -0300 | [diff] [blame] | 111 | |
| 112 | config BOOT_SIGNATURE_TYPE_ED25519 |
| 113 | bool "Edwards curve digital signatures using ed25519" |
Jamie McCrae | 25d2f2c | 2023-07-17 14:17:53 +0100 | [diff] [blame] | 114 | select BOOT_ENCRYPTION_SUPPORT |
Fabio Utzig | 34e93a5 | 2020-02-03 09:59:53 -0300 | [diff] [blame] | 115 | |
| 116 | if BOOT_SIGNATURE_TYPE_ED25519 |
Håkon Øye Amundsen | 21f0376 | 2021-11-12 08:21:31 +0000 | [diff] [blame] | 117 | choice BOOT_ED25519_IMPLEMENTATION |
Fabio Utzig | 34e93a5 | 2020-02-03 09:59:53 -0300 | [diff] [blame] | 118 | prompt "Ecdsa implementation" |
| 119 | default BOOT_ED25519_TINYCRYPT |
| 120 | config BOOT_ED25519_TINYCRYPT |
| 121 | bool "Use tinycrypt" |
| 122 | select BOOT_USE_TINYCRYPT |
| 123 | config BOOT_ED25519_MBEDTLS |
| 124 | bool "Use mbedTLS" |
| 125 | select BOOT_USE_MBEDTLS |
| 126 | select MBEDTLS |
| 127 | endchoice |
| 128 | endif |
| 129 | |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 130 | endchoice |
| 131 | |
Fabio Utzig | c690c76 | 2018-04-26 10:51:09 -0300 | [diff] [blame] | 132 | config BOOT_SIGNATURE_KEY_FILE |
| 133 | string "PEM key file" |
Håkon Øye Amundsen | 705c6c2 | 2020-09-28 09:45:40 +0000 | [diff] [blame] | 134 | default "root-ec-p256.pem" if BOOT_SIGNATURE_TYPE_ECDSA_P256 |
| 135 | default "root-ed25519.pem" if BOOT_SIGNATURE_TYPE_ED25519 |
| 136 | default "root-rsa-3072.pem" if BOOT_SIGNATURE_TYPE_RSA && BOOT_SIGNATURE_TYPE_RSA_LEN=3072 |
| 137 | default "root-rsa-2048.pem" if BOOT_SIGNATURE_TYPE_RSA && BOOT_SIGNATURE_TYPE_RSA_LEN=2048 |
Fabio Utzig | c690c76 | 2018-04-26 10:51:09 -0300 | [diff] [blame] | 138 | default "" |
| 139 | help |
Marek Pieta | bdcfc85 | 2020-08-04 02:22:55 -0700 | [diff] [blame] | 140 | You can use either absolute or relative path. |
| 141 | In case relative path is used, the build system assumes that it starts |
| 142 | from the directory where the MCUBoot KConfig configuration file is |
| 143 | located. If the key file is not there, the build system uses relative |
| 144 | path that starts from the MCUBoot repository root directory. |
Fabio Utzig | c690c76 | 2018-04-26 10:51:09 -0300 | [diff] [blame] | 145 | The key file will be parsed by imgtool's getpub command and a .c source |
| 146 | with the public key information will be written in a format expected by |
| 147 | MCUboot. |
| 148 | |
Andrzej Puzdrowski | 9a605b6 | 2020-03-16 13:34:30 +0100 | [diff] [blame] | 149 | config MCUBOOT_CLEANUP_ARM_CORE |
| 150 | bool "Perform core cleanup before chain-load the application" |
| 151 | depends on CPU_CORTEX_M |
Jamie McCrae | 9e8eddc | 2023-02-27 12:51:09 +0000 | [diff] [blame] | 152 | default y |
Ioannis Glaropoulos | 518d93a | 2020-10-22 14:22:14 +0200 | [diff] [blame] | 153 | help |
| 154 | This option instructs MCUboot to perform a clean-up of a set of |
Marcin Niestroj | 9ced459 | 2023-05-17 14:50:57 +0200 | [diff] [blame] | 155 | architecture core HW registers before jumping to the application |
Ioannis Glaropoulos | 518d93a | 2020-10-22 14:22:14 +0200 | [diff] [blame] | 156 | firmware. The clean-up sets these registers to their warm-reset |
| 157 | values as specified by the architecture. |
| 158 | |
Jamie McCrae | 9e8eddc | 2023-02-27 12:51:09 +0000 | [diff] [blame] | 159 | This option is enabled by default to prevent possible problems when |
| 160 | booting zephyr (or other) applications whereby e.g. a MPU stack guard |
| 161 | may be initialised in RAM which is then used by the application |
| 162 | start-up code which can cause a module fault and potentially make the |
| 163 | module irrecoverable. |
Andrzej Puzdrowski | 9a605b6 | 2020-03-16 13:34:30 +0100 | [diff] [blame] | 164 | |
Marti Bolivar | a4818a5 | 2018-04-12 13:02:38 -0400 | [diff] [blame] | 165 | config MBEDTLS_CFG_FILE |
| 166 | default "mcuboot-mbedtls-cfg.h" |
| 167 | |
David Vincze | 03368b8 | 2020-04-01 12:53:53 +0200 | [diff] [blame] | 168 | config BOOT_HW_KEY |
| 169 | bool "Use HW key for image verification" |
| 170 | default n |
| 171 | help |
| 172 | Use HW key for image verification, otherwise the public key is embedded |
| 173 | in MCUBoot. If enabled the public key is appended to the signed image |
| 174 | and requires the hash of the public key to be provisioned to the device |
| 175 | beforehand. |
| 176 | |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 177 | config BOOT_VALIDATE_SLOT0 |
David Vincze | 2d736ad | 2019-02-18 11:50:22 +0100 | [diff] [blame] | 178 | bool "Validate image in the primary slot on every boot" |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 179 | default y |
| 180 | help |
David Vincze | 2d736ad | 2019-02-18 11:50:22 +0100 | [diff] [blame] | 181 | If y, the bootloader attempts to validate the signature of the |
| 182 | primary slot every boot. This adds the signature check time to |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 183 | every boot, but can mitigate against some changes that are |
| 184 | able to modify the flash image itself. |
| 185 | |
Wouter Cappelle | bb7a39d | 2021-05-03 16:44:44 +0200 | [diff] [blame] | 186 | config BOOT_VALIDATE_SLOT0_ONCE |
| 187 | bool "Validate image in the primary slot just once after after upgrade" |
| 188 | depends on !BOOT_VALIDATE_SLOT0 && SINGLE_APPLICATION_SLOT |
| 189 | default n |
| 190 | help |
| 191 | If y, the bootloader attempts to validate the signature of the |
| 192 | primary slot only once after an upgrade of the main slot. |
| 193 | It caches the result in the magic area, which makes it an unsecure |
| 194 | method. This option is usefull for lowering the boot up time for |
| 195 | low end devices with as a compromise lowering the security level. |
| 196 | If unsure, leave at the default value. |
| 197 | |
David Brown | 08a30a4 | 2022-04-26 14:49:51 -0600 | [diff] [blame] | 198 | config BOOT_PREFER_SWAP_MOVE |
| 199 | bool "Prefer the newer swap move algorithm" |
| 200 | default y if SOC_FAMILY_NRF |
Thomas Stranger | aa217e2 | 2022-10-28 21:17:55 +0200 | [diff] [blame] | 201 | default y if !$(dt_nodelabel_enabled,scratch_partition) |
David Brown | 08a30a4 | 2022-04-26 14:49:51 -0600 | [diff] [blame] | 202 | help |
| 203 | If y, the BOOT_IMAGE_UPGRADE_MODE will default to using |
| 204 | "move" instead of "scratch". This is a separate bool config |
| 205 | option, because Kconfig doesn't allow defaults to be |
| 206 | overridden in choice options. Most devices should be using |
| 207 | swap move. |
| 208 | |
Andrzej Puzdrowski | fdff3e1 | 2020-09-15 08:23:25 +0200 | [diff] [blame] | 209 | if !SINGLE_APPLICATION_SLOT |
Håkon Øye Amundsen | 21f0376 | 2021-11-12 08:21:31 +0000 | [diff] [blame] | 210 | choice BOOT_IMAGE_UPGRADE_MODE |
David Vincze | 5a6e181 | 2020-06-29 13:34:42 +0200 | [diff] [blame] | 211 | prompt "Image upgrade modes" |
David Brown | 08a30a4 | 2022-04-26 14:49:51 -0600 | [diff] [blame] | 212 | default BOOT_SWAP_USING_MOVE if BOOT_PREFER_SWAP_MOVE |
David Vincze | 5a6e181 | 2020-06-29 13:34:42 +0200 | [diff] [blame] | 213 | default BOOT_SWAP_USING_SCRATCH |
| 214 | |
| 215 | config BOOT_SWAP_USING_SCRATCH |
| 216 | bool "Swap mode that run with the scratch partition" |
| 217 | help |
| 218 | This is the most conservative swap mode but it can work even on |
| 219 | devices with heterogeneous flash page layout. |
| 220 | |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 221 | config BOOT_UPGRADE_ONLY |
| 222 | bool "Overwrite image updates instead of swapping" |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 223 | help |
David Vincze | 2d736ad | 2019-02-18 11:50:22 +0100 | [diff] [blame] | 224 | If y, overwrite the primary slot with the upgrade image instead |
| 225 | of swapping them. This prevents the fallback recovery, but |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 226 | uses a much simpler code path. |
| 227 | |
Fabio Utzig | c58842e | 2019-11-28 10:30:01 -0300 | [diff] [blame] | 228 | config BOOT_SWAP_USING_MOVE |
Fabio Utzig | dd2b680 | 2020-01-06 09:10:45 -0300 | [diff] [blame] | 229 | bool "Swap mode that can run without a scratch partition" |
Fabio Utzig | c58842e | 2019-11-28 10:30:01 -0300 | [diff] [blame] | 230 | help |
| 231 | If y, the swap upgrade is done in two steps, where first every |
| 232 | sector of the primary slot is moved up one sector, then for |
| 233 | each sector X in the secondary slot, it is moved to index X in |
| 234 | the primary slot, then the sector at X+1 in the primary is |
| 235 | moved to index X in the secondary. |
| 236 | This allows a swap upgrade without using a scratch partition, |
| 237 | but is currently limited to all sectors in both slots being of |
| 238 | the same size. |
David Vincze | 5a6e181 | 2020-06-29 13:34:42 +0200 | [diff] [blame] | 239 | |
| 240 | config BOOT_DIRECT_XIP |
| 241 | bool "Run the latest image directly from its slot" |
| 242 | help |
| 243 | If y, mcuboot selects the newest valid image based on the image version |
| 244 | numbers, thereafter the selected image can run directly from its slot |
| 245 | without having to move/copy it into the primary slot. For this reason the |
| 246 | images must be linked to be executed from the given image slot. Using this |
| 247 | mode results in a simpler code path and smaller code size. |
| 248 | |
Johan Öhman | b588907 | 2022-04-01 09:10:28 +0200 | [diff] [blame] | 249 | config BOOT_RAM_LOAD |
| 250 | bool "RAM load" |
| 251 | help |
| 252 | If y, mcuboot selects the newest valid image based on the image version |
| 253 | numbers, thereafter the selected image is copied to RAM and executed from |
| 254 | there. For this reason, the image has to be linked to be executed from RAM. |
| 255 | The address that the image is copied to is specified using the load-addr |
| 256 | argument to the imgtool.py script which writes it to the image header. |
| 257 | |
David Vincze | 5a6e181 | 2020-06-29 13:34:42 +0200 | [diff] [blame] | 258 | endchoice |
Fabio Utzig | c58842e | 2019-11-28 10:30:01 -0300 | [diff] [blame] | 259 | |
Johan Öhman | b588907 | 2022-04-01 09:10:28 +0200 | [diff] [blame] | 260 | # Workaround for not being able to have commas in macro arguments |
| 261 | DT_CHOSEN_Z_SRAM := zephyr,sram |
| 262 | |
| 263 | if BOOT_RAM_LOAD |
| 264 | config BOOT_IMAGE_EXECUTABLE_RAM_START |
| 265 | hex "Boot image executable ram start" |
| 266 | default $(dt_chosen_reg_addr_hex,$(DT_CHOSEN_Z_SRAM)) |
| 267 | |
| 268 | config BOOT_IMAGE_EXECUTABLE_RAM_SIZE |
| 269 | int "Boot image executable base size" |
| 270 | default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_SRAM),0) |
| 271 | endif |
| 272 | |
David Vincze | 505fba2 | 2020-10-22 13:53:29 +0200 | [diff] [blame] | 273 | config BOOT_DIRECT_XIP_REVERT |
| 274 | bool "Enable the revert mechanism in direct-xip mode" |
Andrzej Puzdrowski | 32342e7 | 2020-11-18 17:04:44 +0100 | [diff] [blame] | 275 | depends on BOOT_DIRECT_XIP |
David Vincze | 505fba2 | 2020-10-22 13:53:29 +0200 | [diff] [blame] | 276 | default n |
| 277 | help |
| 278 | If y, enables the revert mechanism in direct-xip similar to the one in |
| 279 | swap mode. It requires the trailer magic to be added to the signed image. |
| 280 | When a reboot happens without the image being confirmed at runtime, the |
| 281 | bootloader considers the image faulty and erases it. After this it will |
| 282 | attempt to boot the previous image. The images can also be made permanent |
| 283 | (marked as confirmed in advance) just like in swap mode. |
| 284 | |
Fabio Utzig | d0533ed | 2018-12-19 07:56:33 -0200 | [diff] [blame] | 285 | config BOOT_BOOTSTRAP |
Sam Bristow | d0ca0ff | 2019-10-30 20:51:35 +1300 | [diff] [blame] | 286 | bool "Bootstrap erased the primary slot from the secondary slot" |
Fabio Utzig | d0533ed | 2018-12-19 07:56:33 -0200 | [diff] [blame] | 287 | default n |
| 288 | help |
| 289 | If y, enables bootstraping support. Bootstrapping allows an erased |
David Vincze | 2d736ad | 2019-02-18 11:50:22 +0100 | [diff] [blame] | 290 | primary slot to be initialized from a valid image in the secondary slot. |
Fabio Utzig | d0533ed | 2018-12-19 07:56:33 -0200 | [diff] [blame] | 291 | If unsure, leave at the default value. |
| 292 | |
Fabio Utzig | ca8ead2 | 2019-12-20 07:06:04 -0300 | [diff] [blame] | 293 | config BOOT_SWAP_SAVE_ENCTLV |
| 294 | bool "Save encrypted key TLVs instead of plaintext keys in swap metadata" |
| 295 | default n |
| 296 | help |
| 297 | If y, instead of saving the encrypted image keys in plaintext in the |
| 298 | swap resume metadata, save the encrypted image TLVs. This should be used |
| 299 | when there is no security mechanism protecting the data in the primary |
| 300 | slot from being dumped. If n is selected (default), the keys are written |
| 301 | after being decrypted from the image TLVs and could be read by an |
| 302 | attacker who has access to the flash contents of the primary slot (eg |
| 303 | JTAG/SWD or primary slot in external flash). |
| 304 | If unsure, leave at the default value. |
| 305 | |
David Vincze | 505fba2 | 2020-10-22 13:53:29 +0200 | [diff] [blame] | 306 | endif # !SINGLE_APPLICATION_SLOT |
Fabio Utzig | b6f014c | 2020-04-02 13:25:01 -0300 | [diff] [blame] | 307 | |
Jamie McCrae | 25d2f2c | 2023-07-17 14:17:53 +0100 | [diff] [blame] | 308 | config BOOT_ENCRYPTION_SUPPORT |
| 309 | bool |
| 310 | help |
| 311 | Hidden option used to check if image encryption is supported. |
| 312 | |
| 313 | config BOOT_ENCRYPT_IMAGE |
| 314 | bool "Support for encrypted image updates" |
| 315 | depends on BOOT_ENCRYPTION_SUPPORT |
| 316 | select BOOT_ENCRYPT_RSA if BOOT_SIGNATURE_TYPE_RSA |
| 317 | select BOOT_ENCRYPT_EC256 if BOOT_SIGNATURE_TYPE_ECDSA_P256 |
| 318 | select BOOT_ENCRYPT_X25519 if BOOT_SIGNATURE_TYPE_ED25519 |
| 319 | depends on !SINGLE_APPLICATION_SLOT || MCUBOOT_SERIAL |
| 320 | help |
| 321 | If y, images in the secondary slot can be encrypted and are decrypted |
| 322 | on the fly when upgrading to the primary slot, as well as encrypted |
| 323 | back when swapping from the primary slot to the secondary slot. The |
| 324 | encryption mechanism must match the same type as the signature type, |
| 325 | supported types include: |
| 326 | - RSA-OAEP (2048 bits). |
| 327 | - ECIES using primitives described under "ECIES-P256 encryption" in |
| 328 | docs/encrypted_images.md. |
| 329 | - ECIES using primitives described under "ECIES-X25519 encryption" |
| 330 | in docs/encrypted_images.md. |
| 331 | |
| 332 | Note that for single slot operation, this can still be used to allow |
| 333 | loading encrypted images via serial recovery which are then |
| 334 | decrypted on-the-fly without needing a second slot. |
| 335 | |
| 336 | config BOOT_ENCRYPT_RSA |
| 337 | bool |
| 338 | help |
| 339 | Hidden option selecting RSA encryption. |
| 340 | |
| 341 | config BOOT_ENCRYPT_EC256 |
| 342 | bool |
| 343 | help |
| 344 | Hidden option selecting EC256 encryption. |
| 345 | |
| 346 | config BOOT_ENCRYPT_X25519 |
| 347 | bool |
| 348 | help |
| 349 | Hidden option selecting x25519 encryption. |
| 350 | |
Wouter Cappelle | 953a761 | 2021-05-03 16:53:05 +0200 | [diff] [blame] | 351 | config BOOT_ENCRYPTION_KEY_FILE |
Jamie McCrae | 25d2f2c | 2023-07-17 14:17:53 +0100 | [diff] [blame] | 352 | string "Encryption key file" |
| 353 | depends on BOOT_ENCRYPT_IMAGE |
| 354 | default "enc-rsa2048-priv.pem" if BOOT_ENCRYPT_RSA |
| 355 | default "enc-ec256-priv.pem" if BOOT_ENCRYPT_EC256 |
| 356 | default "enc-x25519-priv.pem" if BOOT_ENCRYPT_X25519 |
Wouter Cappelle | 953a761 | 2021-05-03 16:53:05 +0200 | [diff] [blame] | 357 | default "" |
| 358 | help |
| 359 | You can use either absolute or relative path. |
| 360 | In case relative path is used, the build system assumes that it starts |
| 361 | from the directory where the MCUBoot KConfig configuration file is |
| 362 | located. If the key file is not there, the build system uses relative |
| 363 | path that starts from the MCUBoot repository root directory. |
| 364 | The key file will be parsed by imgtool's getpriv command and a .c source |
| 365 | with the public key information will be written in a format expected by |
| 366 | MCUboot. |
| 367 | |
Marti Bolivar | 0e091c9 | 2018-04-12 11:23:16 -0400 | [diff] [blame] | 368 | config BOOT_MAX_IMG_SECTORS |
| 369 | int "Maximum number of sectors per image slot" |
| 370 | default 128 |
| 371 | help |
| 372 | This option controls the maximum number of sectors that each of |
| 373 | the two image areas can contain. Smaller values reduce MCUboot's |
| 374 | memory usage; larger values allow it to support larger images. |
| 375 | If unsure, leave at the default value. |
| 376 | |
David Vincze | 1cf11b5 | 2020-03-24 07:51:09 +0100 | [diff] [blame] | 377 | config MEASURED_BOOT |
| 378 | bool "Store the boot state/measurements in shared memory" |
| 379 | default n |
| 380 | help |
| 381 | If enabled, the bootloader will store certain boot measurements such as |
| 382 | the hash of the firmware image in a shared memory area. This data can |
| 383 | be used later by runtime services (e.g. by a device attestation service). |
| 384 | |
| 385 | config BOOT_SHARE_DATA |
| 386 | bool "Save application specific data in shared memory area" |
| 387 | default n |
| 388 | |
Håkon Øye Amundsen | 21f0376 | 2021-11-12 08:21:31 +0000 | [diff] [blame] | 389 | choice BOOT_FAULT_INJECTION_HARDENING_PROFILE |
Tamas Ban | fce8733 | 2020-07-10 12:40:11 +0100 | [diff] [blame] | 390 | prompt "Fault injection hardening profile" |
| 391 | default BOOT_FIH_PROFILE_OFF |
| 392 | |
| 393 | config BOOT_FIH_PROFILE_OFF |
| 394 | bool "No hardening against hardware level fault injection" |
| 395 | help |
| 396 | No hardening in SW against hardware level fault injection: power or |
| 397 | clock glitching, etc. |
| 398 | |
| 399 | config BOOT_FIH_PROFILE_LOW |
| 400 | bool "Moderate level hardening against hardware level fault injection" |
| 401 | help |
| 402 | Moderate level hardening: Long global fail loop to avoid break out, |
| 403 | control flow integrity check to discover discrepancy in expected code |
| 404 | flow. |
| 405 | |
| 406 | config BOOT_FIH_PROFILE_MEDIUM |
| 407 | bool "Medium level hardening against hardware level fault injection" |
| 408 | help |
| 409 | Medium level hardening: Long global fail loop to avoid break out, |
| 410 | control flow integrity check to discover discrepancy in expected code |
| 411 | flow, double variables to discover register or memory corruption. |
| 412 | |
| 413 | config BOOT_FIH_PROFILE_HIGH |
| 414 | bool "Maximum level hardening against hardware level fault injection" |
| 415 | select MBEDTLS |
| 416 | help |
| 417 | Maximum level hardening: Long global fail loop to avoid break out, |
| 418 | control flow integrity check to discover discrepancy in expected code |
| 419 | flow, double variables to discover register or memory corruption, random |
| 420 | delays to make code execution less predictable. Random delays requires an |
| 421 | entropy source. |
| 422 | |
| 423 | endchoice |
| 424 | |
Josh Gao | 837cf88 | 2020-11-13 18:51:27 -0800 | [diff] [blame] | 425 | choice BOOT_USB_DFU |
| 426 | prompt "USB DFU" |
| 427 | default BOOT_USB_DFU_NO |
| 428 | |
| 429 | config BOOT_USB_DFU_NO |
| 430 | prompt "Disabled" |
| 431 | |
| 432 | config BOOT_USB_DFU_WAIT |
Rajavardhan Gundi | 51c9d70 | 2019-02-20 14:08:52 +0530 | [diff] [blame] | 433 | bool "Wait for a prescribed duration to see if USB DFU is invoked" |
Johann Fischer | 2585297 | 2021-08-02 13:20:09 +0200 | [diff] [blame] | 434 | select USB_DEVICE_STACK |
Rajavardhan Gundi | 51c9d70 | 2019-02-20 14:08:52 +0530 | [diff] [blame] | 435 | select USB_DFU_CLASS |
| 436 | select IMG_MANAGER |
Dominik Ermel | 143485e | 2023-03-17 11:33:42 +0000 | [diff] [blame] | 437 | select STREAM_FLASH |
| 438 | select MULTITHREADING |
Rajavardhan Gundi | 51c9d70 | 2019-02-20 14:08:52 +0530 | [diff] [blame] | 439 | help |
| 440 | If y, MCUboot waits for a prescribed duration of time to allow |
| 441 | for USB DFU to be invoked. Please note DFU always updates the |
| 442 | slot1 image. |
| 443 | |
Josh Gao | 837cf88 | 2020-11-13 18:51:27 -0800 | [diff] [blame] | 444 | config BOOT_USB_DFU_GPIO |
| 445 | bool "Use GPIO to detect whether to trigger DFU mode" |
Johann Fischer | 2585297 | 2021-08-02 13:20:09 +0200 | [diff] [blame] | 446 | select USB_DEVICE_STACK |
Josh Gao | 837cf88 | 2020-11-13 18:51:27 -0800 | [diff] [blame] | 447 | select USB_DFU_CLASS |
| 448 | select IMG_MANAGER |
Dominik Ermel | 143485e | 2023-03-17 11:33:42 +0000 | [diff] [blame] | 449 | select STREAM_FLASH |
| 450 | select MULTITHREADING |
Josh Gao | 837cf88 | 2020-11-13 18:51:27 -0800 | [diff] [blame] | 451 | help |
| 452 | If y, MCUboot uses GPIO to detect whether to invoke USB DFU. |
| 453 | |
| 454 | endchoice |
| 455 | |
| 456 | config BOOT_USB_DFU_WAIT_DELAY_MS |
| 457 | int "USB DFU wait duration" |
| 458 | depends on BOOT_USB_DFU_WAIT |
| 459 | default 12000 |
| 460 | help |
| 461 | Milliseconds to wait for USB DFU to be invoked. |
| 462 | |
| 463 | if BOOT_USB_DFU_GPIO |
| 464 | |
Josh Gao | 837cf88 | 2020-11-13 18:51:27 -0800 | [diff] [blame] | 465 | config BOOT_USB_DFU_DETECT_DELAY |
| 466 | int "Serial detect pin detection delay time [ms]" |
| 467 | default 0 |
| 468 | help |
| 469 | Used to prevent the bootloader from loading on button press. |
| 470 | Useful for powering on when using the same button as |
| 471 | the one used to place the device in bootloader mode. |
| 472 | |
| 473 | endif # BOOT_USB_DFU_GPIO |
| 474 | |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 475 | config ZEPHYR_TRY_MASS_ERASE |
Jamie McCrae | 9315654 | 2023-01-11 09:33:45 +0000 | [diff] [blame] | 476 | bool "Try to mass erase flash when flashing MCUboot image (DEPRECATED)" |
| 477 | select DEPRECATED |
Marti Bolivar | bc2fa4e | 2018-04-12 12:18:32 -0400 | [diff] [blame] | 478 | help |
| 479 | If y, attempt to configure the Zephyr build system's "flash" |
| 480 | target to mass-erase the flash device before flashing the |
| 481 | MCUboot image. This ensures the scratch and other partitions |
| 482 | are in a consistent state. |
| 483 | |
| 484 | This is not available for all targets. |
| 485 | |
Jamie McCrae | 9315654 | 2023-01-11 09:33:45 +0000 | [diff] [blame] | 486 | This option has been deprecated, to perform a mass erase when |
| 487 | flashing a board, `west flash --erase` should be used instead. |
| 488 | |
David Brown | f6d14c2 | 2019-12-10 15:36:36 -0700 | [diff] [blame] | 489 | config BOOT_USE_BENCH |
| 490 | bool "Enable benchmark code" |
| 491 | default n |
| 492 | help |
| 493 | If y, adds support for simple benchmarking that can record |
| 494 | time intervals between two calls. The time printed depends |
| 495 | on the particular Zephyr target, and is generally ticks of a |
| 496 | specific board-specific timer. |
| 497 | |
Michael Scott | 74ceae5 | 2019-02-01 14:01:09 -0800 | [diff] [blame] | 498 | module = MCUBOOT |
Piotr Mienkowski | 15aa6ef | 2019-04-08 22:48:15 +0200 | [diff] [blame] | 499 | module-str = MCUBoot bootloader |
Michael Scott | 74ceae5 | 2019-02-01 14:01:09 -0800 | [diff] [blame] | 500 | source "subsys/logging/Kconfig.template.log_config" |
Michael Scott | 74ceae5 | 2019-02-01 14:01:09 -0800 | [diff] [blame] | 501 | |
Andrzej Puzdrowski | af14853 | 2020-02-25 12:51:26 +0100 | [diff] [blame] | 502 | config MCUBOOT_LOG_THREAD_STACK_SIZE |
| 503 | int "Stack size for the MCUBoot log processing thread" |
| 504 | depends on LOG && !LOG_IMMEDIATE |
| 505 | default 2048 if COVERAGE_GCOV |
| 506 | default 1024 if NO_OPTIMIZATIONS |
| 507 | default 1024 if XTENSA |
| 508 | default 4096 if (X86 && X86_64) |
| 509 | default 4096 if ARM64 |
| 510 | default 768 |
| 511 | help |
| 512 | Set the internal stack size for MCUBoot log processing thread. |
| 513 | |
Andrzej Puzdrowski | 6c00b5e | 2022-04-01 16:51:27 +0200 | [diff] [blame] | 514 | config MCUBOOT_INDICATION_LED |
| 515 | bool "Turns on LED indication when device is in DFU" |
Jamie McCrae | 2c86755 | 2023-07-27 14:18:47 +0100 | [diff] [blame] | 516 | select GPIO |
Andrzej Puzdrowski | 6c00b5e | 2022-04-01 16:51:27 +0200 | [diff] [blame] | 517 | help |
| 518 | Device device activates the LED while in bootloader mode. |
Jeppe Odgaard | 1dbe0cf | 2023-05-17 11:09:10 +0200 | [diff] [blame] | 519 | mcuboot-led0 alias must be set in the device's .dts |
Andrzej Puzdrowski | 6c00b5e | 2022-04-01 16:51:27 +0200 | [diff] [blame] | 520 | definitions for this to work. |
| 521 | |
Andrzej Puzdrowski | 35f61d3 | 2022-04-01 17:00:08 +0200 | [diff] [blame] | 522 | rsource "Kconfig.serial_recovery" |
Andrzej Puzdrowski | 64ad092 | 2017-09-22 11:33:41 +0200 | [diff] [blame] | 523 | |
Rafał Kuźnia | d854bb6 | 2020-06-17 15:06:47 +0200 | [diff] [blame] | 524 | config BOOT_INTR_VEC_RELOC |
| 525 | bool "Relocate the interrupt vector to the application" |
| 526 | default n |
| 527 | depends on SW_VECTOR_RELAY || CPU_CORTEX_M_HAS_VTOR |
| 528 | help |
| 529 | Relocate the interrupt vector to the application before it is started. |
| 530 | Select this option if application requires vector relocation, |
| 531 | but it doesn't relocate vector in its reset handler. |
| 532 | |
Andrzej Puzdrowski | 16b6d15 | 2020-06-01 14:16:54 +0200 | [diff] [blame] | 533 | config UPDATEABLE_IMAGE_NUMBER |
| 534 | int "Number of updateable images" |
| 535 | default 1 |
Andrzej Puzdrowski | fdff3e1 | 2020-09-15 08:23:25 +0200 | [diff] [blame] | 536 | range 1 1 if SINGLE_APPLICATION_SLOT |
Andrzej Puzdrowski | 16b6d15 | 2020-06-01 14:16:54 +0200 | [diff] [blame] | 537 | help |
| 538 | Enables support of multi image update. |
| 539 | |
Marek Pieta | a95a41b | 2023-04-21 14:03:19 +0200 | [diff] [blame] | 540 | config BOOT_VERSION_CMP_USE_BUILD_NUMBER |
| 541 | bool "Use build number while comparing image version" |
| 542 | depends on (UPDATEABLE_IMAGE_NUMBER > 1) || BOOT_DIRECT_XIP || \ |
| 543 | BOOT_RAM_LOAD || MCUBOOT_DOWNGRADE_PREVENTION |
| 544 | help |
| 545 | By default, the image version comparison relies only on version major, |
| 546 | minor and revision. Enable this option to take into account the build |
| 547 | number as well. |
| 548 | |
Håkon Øye Amundsen | 21f0376 | 2021-11-12 08:21:31 +0000 | [diff] [blame] | 549 | choice BOOT_DOWNGRADE_PREVENTION_CHOICE |
Andrzej Puzdrowski | 16b6d15 | 2020-06-01 14:16:54 +0200 | [diff] [blame] | 550 | prompt "Downgrade prevention" |
| 551 | optional |
| 552 | |
| 553 | config MCUBOOT_DOWNGRADE_PREVENTION |
| 554 | bool "SW based downgrade prevention" |
Jerzy Kasenberg | b8801fc | 2022-06-29 15:54:37 +0200 | [diff] [blame] | 555 | depends on !BOOT_DIRECT_XIP |
Andrzej Puzdrowski | 16b6d15 | 2020-06-01 14:16:54 +0200 | [diff] [blame] | 556 | help |
| 557 | Prevent downgrades by enforcing incrementing version numbers. |
| 558 | When this option is set, any upgrade must have greater major version |
| 559 | or greater minor version with equal major version. This mechanism |
| 560 | only protects against some attacks against version downgrades (for |
| 561 | example, a JTAG could be used to write an older version). |
| 562 | |
Jerzy Kasenberg | b8801fc | 2022-06-29 15:54:37 +0200 | [diff] [blame] | 563 | config MCUBOOT_DOWNGRADE_PREVENTION_SECURITY_COUNTER |
| 564 | bool "Use image security counter instead of version number" |
| 565 | depends on MCUBOOT_DOWNGRADE_PREVENTION |
| 566 | depends on (BOOT_SWAP_USING_MOVE || BOOT_SWAP_USING_SCRATCH) |
| 567 | help |
| 568 | Security counter is used for version eligibility check instead of pure |
| 569 | version. When this option is set, any upgrade must have greater or |
| 570 | equal security counter value. |
| 571 | Because of the acceptance of equal values it allows for software |
| 572 | downgrades to some extent. |
| 573 | |
Andrzej Puzdrowski | 16b6d15 | 2020-06-01 14:16:54 +0200 | [diff] [blame] | 574 | config MCUBOOT_HW_DOWNGRADE_PREVENTION |
| 575 | bool "HW based downgrade prevention" |
| 576 | help |
| 577 | Prevent undesirable/malicious software downgrades. When this option is |
| 578 | set, any upgrade must have greater or equal security counter value. |
| 579 | Because of the acceptance of equal values it allows for software |
| 580 | downgrade to some extent. |
| 581 | |
| 582 | endchoice |
| 583 | |
Andrzej Puzdrowski | d21442a | 2020-10-12 16:47:28 +0200 | [diff] [blame] | 584 | config BOOT_WATCHDOG_FEED |
| 585 | bool "Feed the watchdog while doing swap" |
Andrzej Puzdrowski | b25ba4b | 2022-09-28 15:58:19 +0200 | [diff] [blame] | 586 | default y if WATCHDOG |
| 587 | default y if SOC_FAMILY_NRF |
| 588 | # for nRF nrfx based implementation is available |
Bartosz Bilas | a1c8c8e | 2022-08-30 21:50:28 +0200 | [diff] [blame] | 589 | imply NRFX_WDT if SOC_FAMILY_NRF |
| 590 | imply NRFX_WDT0 if SOC_FAMILY_NRF |
| 591 | imply NRFX_WDT1 if SOC_FAMILY_NRF |
Andrzej Puzdrowski | d21442a | 2020-10-12 16:47:28 +0200 | [diff] [blame] | 592 | help |
| 593 | Enables implementation of MCUBOOT_WATCHDOG_FEED() macro which is |
| 594 | used to feed watchdog while doing time consuming operations. |
| 595 | |
Andrzej Puzdrowski | 914204d | 2021-07-09 19:20:46 +0200 | [diff] [blame] | 596 | config BOOT_IMAGE_ACCESS_HOOKS |
| 597 | bool "Enable hooks for overriding MCUboot's native routines" |
| 598 | help |
| 599 | Allow to provide procedures for override or extend native |
| 600 | MCUboot's routines required for access the image data and the image |
Andrzej Puzdrowski | 1c150c6 | 2022-07-07 14:55:22 +0200 | [diff] [blame] | 601 | update. It is up to the project customization to add required source |
| 602 | files to the build. |
Andrzej Puzdrowski | 914204d | 2021-07-09 19:20:46 +0200 | [diff] [blame] | 603 | |
Jamie McCrae | 56cb610 | 2022-03-23 11:57:03 +0000 | [diff] [blame] | 604 | config MCUBOOT_ACTION_HOOKS |
| 605 | bool "Enable hooks for responding to MCUboot status changes" |
| 606 | help |
| 607 | This will call a handler when the MCUboot status changes which allows |
| 608 | for some level of user feedback, for instance to change LED status to |
| 609 | indicate a failure, using the callback: |
| 610 | 'void mcuboot_status_change(mcuboot_status_type_t status)' where |
| 611 | 'mcuboot_status_type_t' is listed in |
| 612 | boot/bootutil/include/bootutil/mcuboot_status.h |
| 613 | |
Andrzej Puzdrowski | 9754328 | 2018-04-12 15:16:56 +0200 | [diff] [blame] | 614 | endmenu |
| 615 | |
Carles Cufi | 84ede58 | 2018-01-29 15:12:00 +0100 | [diff] [blame] | 616 | config MCUBOOT_DEVICE_SETTINGS |
| 617 | # Hidden selector for device-specific settings |
| 618 | bool |
| 619 | default y |
| 620 | # CPU options |
| 621 | select MCUBOOT_DEVICE_CPU_CORTEX_M0 if CPU_CORTEX_M0 |
Carles Cufi | 67c792e | 2018-01-29 15:14:31 +0100 | [diff] [blame] | 622 | # Enable flash page layout if available |
| 623 | select FLASH_PAGE_LAYOUT if FLASH_HAS_PAGE_LAYOUT |
Andrzej Puzdrowski | b788c71 | 2018-04-12 12:42:49 +0200 | [diff] [blame] | 624 | # Enable flash_map module as flash I/O back-end |
| 625 | select FLASH_MAP |
Carles Cufi | 84ede58 | 2018-01-29 15:12:00 +0100 | [diff] [blame] | 626 | |
| 627 | config MCUBOOT_DEVICE_CPU_CORTEX_M0 |
| 628 | # Hidden selector for Cortex-M0 settings |
| 629 | bool |
| 630 | default n |
| 631 | select SW_VECTOR_RELAY if !CPU_CORTEX_M0_HAS_VECTOR_TABLE_REMAP |
| 632 | |
Marti Bolivar | 0e091c9 | 2018-04-12 11:23:16 -0400 | [diff] [blame] | 633 | comment "Zephyr configuration options" |
Andrzej Puzdrowski | 64ad092 | 2017-09-22 11:33:41 +0200 | [diff] [blame] | 634 | |
Marti Bolivar | f84cc4b | 2019-08-20 16:06:56 -0700 | [diff] [blame] | 635 | # Disabling MULTITHREADING provides a code size advantage, but |
| 636 | # it requires peripheral drivers (particularly a flash driver) |
| 637 | # that works properly with the option enabled. |
| 638 | # |
| 639 | # If you know for sure that your hardware will work, you can default |
| 640 | # it to n here. Otherwise, having it on by default makes the most |
| 641 | # hardware work. |
| 642 | config MULTITHREADING |
Andrzej Puzdrowski | 9a4946c | 2020-02-20 12:39:12 +0100 | [diff] [blame] | 643 | default y if BOOT_SERIAL_CDC_ACM #usb driver requires MULTITHREADING |
Josh Gao | 837cf88 | 2020-11-13 18:51:27 -0800 | [diff] [blame] | 644 | default y if BOOT_USB_DFU_GPIO || BOOT_USB_DFU_WAIT |
Marti Bolivar | f84cc4b | 2019-08-20 16:06:56 -0700 | [diff] [blame] | 645 | default n if SOC_FAMILY_NRF |
Marek Matej | 6769344 | 2023-01-23 17:54:36 +0100 | [diff] [blame] | 646 | default n if SOC_FAMILY_ESP32 && MCUBOOT |
Marti Bolivar | f84cc4b | 2019-08-20 16:06:56 -0700 | [diff] [blame] | 647 | default y |
| 648 | |
Andrzej Puzdrowski | 3f092bd | 2020-02-17 13:25:32 +0100 | [diff] [blame] | 649 | config LOG_PROCESS_THREAD |
| 650 | default n # mcuboot has its own log processing thread |
| 651 | |
| 652 | # override USB device name |
| 653 | config USB_DEVICE_PRODUCT |
| 654 | default "MCUBOOT" |
Andrzej Puzdrowski | 9a4946c | 2020-02-20 12:39:12 +0100 | [diff] [blame] | 655 | |
Andrzej Puzdrowski | f573b39 | 2020-11-10 14:35:15 +0100 | [diff] [blame] | 656 | # use MCUboot's own log configuration |
| 657 | config MCUBOOT_BOOTUTIL_LIB_OWN_LOG |
| 658 | bool |
| 659 | default n |
| 660 | |
Håkon Øye Amundsen | e829e9d | 2021-11-12 14:01:01 +0000 | [diff] [blame] | 661 | config MCUBOOT_VERIFY_IMG_ADDRESS |
| 662 | bool "Verify reset address of image in secondary slot" |
| 663 | depends on UPDATEABLE_IMAGE_NUMBER > 1 |
| 664 | depends on !BOOT_ENCRYPT_IMAGE |
| 665 | depends on ARM |
| 666 | default y if BOOT_UPGRADE_ONLY |
| 667 | help |
| 668 | Verify that the reset address in the image located in the secondary slot |
| 669 | is contained within the corresponding primary slot. This is recommended |
| 670 | if swapping is not used (that is, BOOT_UPGRADE_ONLY is set). If a user |
| 671 | incorrectly uploads an update for image 1 to image 0's secondary slot |
| 672 | MCUboot will overwrite image 0's primary slot with this image even |
| 673 | though it will not boot. If swapping is enabled this will be handled |
| 674 | since the image will not confirm itself. If, however, swapping is not |
| 675 | enabled then the only mitigation is serial recovery. This feature can |
| 676 | also be useful when BOOT_DIRECT_XIP is enabled, to ensure that the image |
| 677 | linked at the correct address is loaded. |
| 678 | |
Robert Lubos | 1b19d2a | 2020-01-31 14:05:35 +0100 | [diff] [blame] | 679 | source "Kconfig.zephyr" |