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 @@ -35,6 +35,7 @@ downgrade-prevention = ["mcuboot-sys/downgrade-prevention"]
3535max-align-32 = [" mcuboot-sys/max-align-32" ]
3636hw-rollback-protection = [" mcuboot-sys/hw-rollback-protection" ]
3737check-load-addr = [" mcuboot-sys/check-load-addr" ]
38+ logical-sectors-4k = [" mcuboot-sys/logical-sectors-4k" ]
3839
3940[dependencies ]
4041byteorder = " 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 @@ -40,6 +40,7 @@ fn main() {
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 ( ) ;
4242 let check_load_addr = env:: var ( "CARGO_FEATURE_CHECK_LOAD_ADDR" ) . is_ok ( ) ;
43+ let logical_sectors_4k = env:: var ( "CARGO_FEATURE_LOGICAL_SECTORS_4K" ) . is_ok ( ) ;
4344
4445 let mut conf = CachedBuild :: new ( ) ;
4546 conf. conf . define ( "__BOOTSIM__" , None ) ;
@@ -54,6 +55,10 @@ fn main() {
5455 conf. conf . define ( "MCUBOOT_BOOT_MAX_ALIGN" , Some ( "8" ) ) ;
5556 }
5657
58+ if logical_sectors_4k {
59+ conf. conf . define ( "MCUBOOT_LOGICAL_SECTOR_SIZE" , Some ( "4096" ) ) ;
60+ }
61+
5762 conf. conf . define ( "MCUBOOT_IMAGE_NUMBER" , Some ( if multiimage { "2" } else { "1" } ) ) ;
5863
5964 if downgrade_prevention && !overwrite_only {
You can’t perform that action at this time.
0 commit comments