@@ -191,28 +191,28 @@ def EigenFwDownload(self):
191
191
shutil .copytree (fdir1 , str (Path (tmp_path ) / "fw" ))
192
192
shutil .copytree (str (EXES_PATH / "Eigen" ), str (Path (tmp_path ) / "Eigen" ))
193
193
194
+ extra = dict ()
194
195
try :
195
196
config = configparser .ConfigParser (interpolation = None )
196
197
logger .info ('quec_download_config.ini path: {}' .format (str (Path (tmp_path ) / "fw/quec_download_config.ini" )))
197
198
config .read (str (Path (tmp_path ) / "fw/quec_download_config.ini" ))
198
199
File_Count = int (config .get ('File' , 'File_Count' ))
200
+ extra ['File_Count' ] = File_Count
199
201
200
202
ap_application_addr = config .get ('File_1' , 'START_ADDR' )
201
203
ap_application_max = config .get ('File_1' , 'MAX_SIZE' )
202
204
flexfile2 = ap_application_addr + " " + ap_application_max
205
+ extra ['flexfile2' ] = flexfile2
203
206
204
207
ap_updater_addr = config .get ('File_2' , 'START_ADDR' )
205
208
ap_updater_max = config .get ('File_2' , 'MAX_SIZE' )
206
209
flexfile3 = ap_updater_addr + " " + ap_updater_max
210
+ extra ['flexfile3' ] = flexfile3
207
211
208
212
customer_fs_addr = config .get ('File_3' , 'START_ADDR' )
209
213
customer_fs_max = config .get ('File_3' , 'MAX_SIZE' )
210
214
flexfile4 = customer_fs_addr + " " + customer_fs_max
211
-
212
- if File_Count == 4 :
213
- customer_backup_fs_addr = config .get ('File_4' , 'START_ADDR' )
214
- customer_backup_fs_max = config .get ('File_4' , 'MAX_SIZE' )
215
- flexfile5 = customer_backup_fs_addr + " " + customer_backup_fs_max
215
+ extra ['flexfile4' ] = flexfile4
216
216
217
217
binpkg_config = configparser .ConfigParser (interpolation = None )
218
218
binpkg_config_ini = str (Path (tmp_path ) / "Eigen/config.ini" )
@@ -233,7 +233,13 @@ def EigenFwDownload(self):
233
233
234
234
binpkg_config .set ('flexfile4' , 'filepath' , str (Path (tmp_path ) / "fw/customer_fs.bin" ))
235
235
binpkg_config .set ('flexfile4' , 'burnaddr' , customer_fs_addr )
236
+
236
237
if File_Count == 4 :
238
+ customer_backup_fs_addr = config .get ('File_4' , 'START_ADDR' )
239
+ customer_backup_fs_max = config .get ('File_4' , 'MAX_SIZE' )
240
+ flexfile5 = customer_backup_fs_addr + " " + customer_backup_fs_max
241
+ extra ['flexfile5' ] = flexfile5
242
+
237
243
binpkg_config .set ('flexfile5' , 'filepath' ,
238
244
str (Path (tmp_path ) / "fw/customer_backup_fs.bin" ))
239
245
binpkg_config .set ('flexfile5' , 'burnaddr' , customer_backup_fs_addr )
@@ -247,15 +253,6 @@ def EigenFwDownload(self):
247
253
with open (binpkg_config_ini , "w+" , encoding = 'utf-8' ) as f :
248
254
binpkg_config .write (f )
249
255
250
- extra = dict (
251
- File_Count = File_Count ,
252
- flexfile2 = flexfile2 ,
253
- flexfile3 = flexfile3 ,
254
- flexfile4 = flexfile4 ,
255
- )
256
- if File_Count == 4 :
257
- extra .update (dict (flexfile5 = flexfile5 ))
258
-
259
256
return self .fw_download (
260
257
str (Path (tmp_path ) / "Eigen/flashtoolcli1.exe" ),
261
258
str (Path (tmp_path ) / "fw" / self .fw_filepath .name ),
0 commit comments