@@ -146,7 +146,7 @@ class Args(object):
146
146
pass
147
147
148
148
149
- def load_tar (fileobj , prog , secure = False , sff_enable = True ):
149
+ def load_tar (fileobj , prog , secure = False ):
150
150
script = None
151
151
legacy = False
152
152
try :
@@ -159,15 +159,9 @@ def load_tar(fileobj, prog, secure=False, sff_enable=True):
159
159
if fsize == 0x800000 :
160
160
try :
161
161
if secure :
162
- if sff_enable :
163
- script_file = json .loads (tar .extractfile ("script_8MB_small_factory_fw_enc" ).read ().decode ('UTF-8' ))
164
- else :
165
- script_file = json .loads (tar .extractfile ("script_8MB_normal_factory_fw_enc" ).read ().decode ('UTF-8' ))
162
+ script_file = json .loads (tar .extractfile ("script_8MB_enc" ).read ().decode ('UTF-8' ))
166
163
else :
167
- if sff_enable :
168
- script_file = json .loads (tar .extractfile ("script_8MB_small_factory_fw" ).read ().decode ('UTF-8' ))
169
- else :
170
- script_file = json .loads (tar .extractfile ("script_8MB_normal_factory_fw" ).read ().decode ('UTF-8' ))
164
+ script_file = json .loads (tar .extractfile ("script_8MB" ).read ().decode ('UTF-8' ))
171
165
except :
172
166
print_debug ("Error Loading script_8MB ... defaulting to legacy script2!" , True )
173
167
legacy = True
@@ -1025,7 +1019,6 @@ def process_arguments():
1025
1019
cmd_parser_flash .add_argument ('-p' , '--partition' , default = None , help = help_msg [:- 2 ] + ')' )
1026
1020
# cmd_parser_flash.add_argument('-d', '--directory', default=None, help='directory to look for files when using -s / --script')
1027
1021
# cmd_parser_flash.add_argument('-s', '--script', default=None, help='script file to execute')
1028
- cmd_parser_flash .add_argument ('-sff' , '--sff_enable' , default = True , type = str2bool , nargs = '?' , const = True , help = "Select whether Small Factory Firmware mode is supported" )
1029
1022
cmd_parser_copy = subparsers .add_parser ('copy' , help = 'Read/Write flash memory partition' )
1030
1023
help_msg = 'The partition to read/write ('
1031
1024
for partition in PARTITIONS .keys ():
@@ -1214,7 +1207,7 @@ def progress_fs(msg):
1214
1207
if args .tar is not None :
1215
1208
try :
1216
1209
tar_file = open (args .tar , "rb" )
1217
- script = load_tar (tar_file , nPy , args .secureboot , args . sff_enable )
1210
+ script = load_tar (tar_file , nPy , args .secureboot )
1218
1211
if not args .quiet :
1219
1212
# sys.stdout = old_stdout
1220
1213
sys .stderr .flush ()
0 commit comments