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