@@ -38,6 +38,8 @@ string isp_file_name_buf[100];
3838string nn_model_yolotiny_name, nn_model_srcfd_name, nn_model_mobilefacenet_name, nn_model_yamnet_name, nn_model_imgclass_name, nn_header_name1, nn_header_name2, nn_header_name3, nn_header_name4, nn_header_name5, isp_bin_check_name, ota_mode_check_name, fcs_mode_check_name;
3939string ino_name_buf[100 ];
4040
41+ string partitiontable_json_name, partition_bin_name;
42+
4143int isp_selection_check = 0 ;
4244int nn_model_selection_check = 0 ;
4345int ota_mode_selection_check = 0 ;
@@ -307,7 +309,7 @@ int main(int argc, char *argv[]) {
307309 string string_temp_1 = " cp misc/video_img/" ;
308310 string string_temp_2 = " ./" ;
309311 string string_temp_3 = " cp misc/nn_img/" ;
310- string string_temp_4 = " cp " ;
312+ string string_temp_4 = " cp -r " ;
311313 string string_temp_5 = " /*" ;
312314 string string_temp_6 = " cp image_tool/" ;
313315 string string_temp_7 = " misc/video_img/" ;
@@ -580,21 +582,32 @@ int main(int argc, char *argv[]) {
580582 system (cmd.c_str ());
581583 }
582584
585+ ota_mode_check_name = argv[8 ];
586+ ota_mode_check (ota_mode_check_name);
587+
588+ if (ota_mode_selection_check == 1 ){
589+ partitiontable_json_name = " amebapro2_partitiontable_OTA.json" ;
590+ partition_bin_name = " partition_ota.bin" ;
591+ } else {
592+ partitiontable_json_name = " amebapro2_partitiontable.json" ;
593+ partition_bin_name = " partition.bin" ;
594+ }
595+
583596 cmdss.clear ();
584- cmdss << string_temp_1 << " combine amebapro2_partitiontable.json system_files.bin PT_PT=partition.bin ,CER_TBL=certable.bin,KEY_CER1=certificate.bin,PT_BL_PRI=boot.bin,PT_FCSDATA=boot_fcs.bin" ;
597+ cmdss << string_temp_1 << " combine " << partitiontable_json_name << " system_files.bin PT_PT=" << partition_bin_name << " ,CER_TBL=certable.bin,KEY_CER1=certificate.bin,PT_BL_PRI=boot.bin,PT_FCSDATA=boot_fcs.bin" ;
585598 getline (cmdss, cmd);
586599 cout << cmd << endl;
587600 system (cmd.c_str ());
588601
589602 if (nn_model_selection_check == 1 ) {
590603 cmdss.clear ();
591- cmdss << string_temp_1 << " combine amebapro2_partitiontable.json flash_ntz.bin PT_PT=partition.bin ,CER_TBL=certable.bin,KEY_CER1=certificate.bin,PT_BL_PRI=boot.bin,PT_FW1=firmware.bin,PT_NN_MDL=nn_model.bin,PT_ISP_IQ=firmware_isp_iq.bin,PT_FCSDATA=boot_fcs.bin" ;
604+ cmdss << string_temp_1 << " combine " << partitiontable_json_name << " flash_ntz.bin PT_PT=" << partition_bin_name << " ,CER_TBL=certable.bin,KEY_CER1=certificate.bin,PT_BL_PRI=boot.bin,PT_FW1=firmware.bin,PT_NN_MDL=nn_model.bin,PT_ISP_IQ=firmware_isp_iq.bin,PT_FCSDATA=boot_fcs.bin" ;
592605 getline (cmdss, cmd);
593606 cout << cmd << endl;
594607 system (cmd.c_str ());
595608 } else {
596609 cmdss.clear ();
597- cmdss << string_temp_1 << " combine amebapro2_partitiontable.json flash_ntz.bin PT_PT=partition.bin ,CER_TBL=certable.bin,KEY_CER1=certificate.bin,PT_BL_PRI=boot.bin,PT_FW1=firmware.bin,PT_ISP_IQ=firmware_isp_iq.bin,PT_FCSDATA=boot_fcs.bin" ;
610+ cmdss << string_temp_1 << " combine " << partitiontable_json_name << " flash_ntz.bin PT_PT=" << partition_bin_name << " ,CER_TBL=certable.bin,KEY_CER1=certificate.bin,PT_BL_PRI=boot.bin,PT_FW1=firmware.bin,PT_ISP_IQ=firmware_isp_iq.bin,PT_FCSDATA=boot_fcs.bin" ;
598611 getline (cmdss, cmd);
599612 cout << cmd << endl;
600613 system (cmd.c_str ());
@@ -623,9 +636,6 @@ int main(int argc, char *argv[]) {
623636 #error compiler is not supported!
624637#endif
625638
626- ota_mode_check_name = argv[8 ];
627- ota_mode_check (ota_mode_check_name);
628-
629639 if (ota_mode_selection_check == 1 ) {
630640 cmdss.clear ();
631641 cmdss << string_temp_1 << " -E copy " << string_temp_3 << " firmware.bin " << string_temp_3 << " ota.bin" ;
0 commit comments