File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,22 @@ config BOOT_IMG_HASH_ALG_SHA512_ALLOW
88
88
help
89
89
Hidden option set by configurations that allow SHA512
90
90
91
+ config BOOT_IMG_HASH_DIRECTLY_ON_STORAGE
92
+ bool "Hash calculation functions access storage through address space"
93
+ depends on !BOOT_ENCRYPT_IMAGE
94
+ help
95
+ When possible to map storage device, at least for read operations,
96
+ to address space or RAM area, enabling this option allows hash
97
+ calculation functions to directly access the storage through that address
98
+ space or using its own DMA. This reduces flash read overhead done
99
+ by MCUboot.
100
+ Notes:
101
+ - not supported when encrypted images are in use, because calculating
102
+ SHA requires image to be decrypted first, which is done in RAM.
103
+ - currently only supported on internal storage of devices; this
104
+ option will not work with devices that use external storage for
105
+ either of the image slots.
106
+
91
107
choice BOOT_IMG_HASH_ALG
92
108
prompt "Selected image hash algorithm"
93
109
default BOOT_IMG_HASH_ALG_SHA256 if BOOT_IMG_HASH_ALG_SHA256_ALLOW
Original file line number Diff line number Diff line change 149
149
#define MCUBOOT_DECOMPRESS_IMAGES
150
150
#endif
151
151
152
+ /* Invoke hashing functions directly on storage device. This requires the device
153
+ * be able to map storage to address space or RAM.
154
+ */
155
+ #ifdef CONFIG_BOOT_IMG_HASH_DIRECTLY_ON_STORAGE
156
+ #define MCUBOOT_HASH_STORAGE_DIRECTLY
157
+ #endif
158
+
152
159
#ifdef CONFIG_BOOT_BOOTSTRAP
153
160
#define MCUBOOT_BOOTSTRAP 1
154
161
#endif
You can’t perform that action at this time.
0 commit comments