File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ direct-xip = ["mcuboot-sys/direct-xip"]
34
34
downgrade-prevention = [" mcuboot-sys/downgrade-prevention" ]
35
35
max-align-32 = [" mcuboot-sys/max-align-32" ]
36
36
hw-rollback-protection = [" mcuboot-sys/hw-rollback-protection" ]
37
+ logical-sectors-4k = [" mcuboot-sys/logical-sectors-4k" ]
37
38
38
39
[dependencies ]
39
40
byteorder = " 1.4"
Original file line number Diff line number Diff line change @@ -93,6 +93,9 @@ downgrade-prevention = []
93
93
# Support images with 32-byte maximum write alignment value.
94
94
max-align-32 = []
95
95
96
+ # Use logical sectors
97
+ logical-sectors-4k = []
98
+
96
99
# Enable hardware rollback protection
97
100
hw-rollback-protection = []
98
101
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ fn main() {
39
39
let direct_xip = env:: var ( "CARGO_FEATURE_DIRECT_XIP" ) . is_ok ( ) ;
40
40
let max_align_32 = env:: var ( "CARGO_FEATURE_MAX_ALIGN_32" ) . is_ok ( ) ;
41
41
let hw_rollback_protection = env:: var ( "CARGO_FEATURE_HW_ROLLBACK_PROTECTION" ) . is_ok ( ) ;
42
+ let logical_sectors_4k = env:: var ( "CARGO_FEATURE_LOGICAL_SECTORS_4K" ) . is_ok ( ) ;
42
43
43
44
let mut conf = CachedBuild :: new ( ) ;
44
45
conf. conf . define ( "__BOOTSIM__" , None ) ;
@@ -53,6 +54,10 @@ fn main() {
53
54
conf. conf . define ( "MCUBOOT_BOOT_MAX_ALIGN" , Some ( "8" ) ) ;
54
55
}
55
56
57
+ if logical_sectors_4k {
58
+ conf. conf . define ( "MCUBOOT_LOGICAL_SECTOR_SIZE" , Some ( "4096" ) ) ;
59
+ }
60
+
56
61
conf. conf . define ( "MCUBOOT_IMAGE_NUMBER" , Some ( if multiimage { "2" } else { "1" } ) ) ;
57
62
58
63
if downgrade_prevention && !overwrite_only {
You can’t perform that action at this time.
0 commit comments