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"]
3434downgrade-prevention = [" mcuboot-sys/downgrade-prevention" ]
3535max-align-32 = [" mcuboot-sys/max-align-32" ]
3636hw-rollback-protection = [" mcuboot-sys/hw-rollback-protection" ]
37+ logical-sectors-4k = [" mcuboot-sys/logical-sectors-4k" ]
3738
3839[dependencies ]
3940byteorder = " 1.4"
Original file line number Diff line number Diff line change @@ -93,6 +93,9 @@ downgrade-prevention = []
9393# Support images with 32-byte maximum write alignment value.
9494max-align-32 = []
9595
96+ # Use logical sectors
97+ logical-sectors-4k = []
98+
9699# Enable hardware rollback protection
97100hw-rollback-protection = []
98101
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ fn main() {
3939 let direct_xip = env:: var ( "CARGO_FEATURE_DIRECT_XIP" ) . is_ok ( ) ;
4040 let max_align_32 = env:: var ( "CARGO_FEATURE_MAX_ALIGN_32" ) . is_ok ( ) ;
4141 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 ( ) ;
4243
4344 let mut conf = CachedBuild :: new ( ) ;
4445 conf. conf . define ( "__BOOTSIM__" , None ) ;
@@ -53,6 +54,10 @@ fn main() {
5354 conf. conf . define ( "MCUBOOT_BOOT_MAX_ALIGN" , Some ( "8" ) ) ;
5455 }
5556
57+ if logical_sectors_4k {
58+ conf. conf . define ( "MCUBOOT_LOGICAL_SECTOR_SIZE" , Some ( "4096" ) ) ;
59+ }
60+
5661 conf. conf . define ( "MCUBOOT_IMAGE_NUMBER" , Some ( if multiimage { "2" } else { "1" } ) ) ;
5762
5863 if downgrade_prevention && !overwrite_only {
You can’t perform that action at this time.
0 commit comments