@@ -134,7 +134,7 @@ def elf2bin(self, input: str, ota_idx: int) -> List[FirmwareBinary]:
134134 nmap_ota1 = self .board .toolchain .nm (input )
135135
136136 # build the partition table
137- ptable = PartitionTable (user_data = b"\xFF " * 256 )
137+ ptable = PartitionTable (user_data = b"\xff " * 256 )
138138 for region , type in config .ptable .items ():
139139 offset , length , _ = self .board .region (region )
140140 hash_key = config .keys .hash_keys [region ]
@@ -205,11 +205,11 @@ def elf2bin(self, input: str, ota_idx: int) -> List[FirmwareBinary]:
205205 with output .write () as f :
206206 f .write (data )
207207 with out_ptab .write () as f :
208- ptab = data [ptab_offset :ptab_end ].rstrip (b"\xFF " )
208+ ptab = data [ptab_offset :ptab_end ].rstrip (b"\xff " )
209209 ptab = pad_data (ptab , 0x20 , 0xFF )
210210 f .write (ptab )
211211 with out_boot .write () as f :
212- boot = data [boot_offset :boot_end ].rstrip (b"\xFF " )
212+ boot = data [boot_offset :boot_end ].rstrip (b"\xff " )
213213 boot = pad_data (boot , 0x20 , 0xFF )
214214 f .write (boot )
215215 with out_ota1 .write () as f :
@@ -230,15 +230,15 @@ def detect_file_type(
230230 return Detection .make ("Realtek AmebaZ2 Flash Image" , offset = 0 )
231231
232232 if (
233- data [0x40 :0x44 ] != b"\xFF \xFF \xFF \xFF "
233+ data [0x40 :0x44 ] != b"\xff \xff \xff \xff "
234234 and data [0x48 ] == ImageType .BOOT .value
235235 ):
236236 return Detection .make ("Realtek AmebaZ2 Bootloader" , offset = 0x4000 )
237237
238238 if (
239- data [0xE0 :0xE8 ].strip (b"\xFF " )
239+ data [0xE0 :0xE8 ].strip (b"\xff " )
240240 and data [0xE8 ] == ImageType .FWHS_S .value
241- and data [0x1A0 :0x1A8 ].strip (b"\xFF " )
241+ and data [0x1A0 :0x1A8 ].strip (b"\xff " )
242242 and data [0x1A8 ] == SectionType .SRAM .value
243243 ):
244244 return Detection .make ("Realtek AmebaZ2 Firmware" , offset = None )
0 commit comments