Merge branch 'Branch_S550_Fast_Emmc' of gitlab.sifar.tech:linux-em-group/s530-ntk into Branch_S550_Fast_Emmc

This commit is contained in:
payton 2024-01-29 14:14:53 +08:00
commit ba60a3f1a9
2 changed files with 16 additions and 13 deletions

View File

@ -91,6 +91,7 @@ static BOOL sf_is_4g_module_usb_update_file_exist(UINT8 *updateFname)
} }
} }
} }
printf("[%s:%d]no update file in emmc \n", __FUNCTION__, __LINE__);
dirp=opendir((char *)"/mnt/sd/"); dirp=opendir((char *)"/mnt/sd/");
if (dirp != NULL) if (dirp != NULL)
@ -118,7 +119,7 @@ static BOOL sf_is_4g_module_usb_update_file_exist(UINT8 *updateFname)
closedir(dirp); closedir(dirp);
//free(strg_path); //free(strg_path);
printf("[%s:%d]no update file\n", __FUNCTION__, __LINE__); printf("[%s:%d]no update file in sd card \n", __FUNCTION__, __LINE__);
return FALSE; return FALSE;
} }

View File

@ -1244,22 +1244,24 @@ UINT32 sf_4g_update(UINT8 *upFname)
if(strncmp(puiPara->ModuleVer, GPRS_MODULE_TYPE_EG915Q, 6) == 0){ if(strncmp(puiPara->ModuleVer, GPRS_MODULE_TYPE_EG915Q, 6) == 0){
sprintf(cmdStr, "/usr/bin/DownloadCLI-EG915Q -p /dev/ttyACM0 -c %s/cfg_ec618_usb.ini -B \"BL AP CP\" -r", upFname); sprintf(cmdStr, "/usr/bin/DownloadCLI-EG915Q -p /dev/ttyACM0 -c %s/cfg_ec618_usb.ini -B \"BL AP CP\" -r", upFname);
sprintf(cmdtmp, "/dev/ttyACM0"); sprintf(cmdtmp, "/dev/ttyACM0");
for (UINT8 i = 0; i < 40; i++) {
if (access(cmdtmp, F_OK) == SF_SUCCESS) {
ret = SF_SUCCESS;
printf("[%s:%d] %s exist!\r\n", __FUNCTION__, __LINE__,cmdtmp);
break;
}
else {
//usleep(100 * 1000);
sf_sleep_ms(500);
}
}
}else { }else {
sprintf(cmdStr, "/usr/bin/QFirehose-EG91 -f %s",upFname); sprintf(cmdStr, "/usr/bin/QFirehose-EG91 -f %s",upFname);
sprintf(cmdtmp, "/dev/ttyUSB0"); sprintf(cmdtmp, "/dev/ttyUSB0");
printf("[%s:%d] %s exist!\r\n", __FUNCTION__, __LINE__,cmdtmp);
ret = SF_SUCCESS;
} }
printf("[%s:%d] cmd:%s\n", __FUNCTION__, __LINE__,cmdStr); printf("[%s:%d] cmd:%s\n", __FUNCTION__, __LINE__,cmdStr);
for (UINT8 i = 0; i < 40; i++) {
if (access(cmdtmp, F_OK) == SF_SUCCESS) {
ret = SF_SUCCESS;
printf("[%s:%d] %s exist!\r\n", __FUNCTION__, __LINE__,cmdtmp);
break;
}
else {
//usleep(100 * 1000);
sf_sleep_ms(500);
}
}
if (ret == SF_SUCCESS) { if (ret == SF_SUCCESS) {
ret = system(cmdStr); ret = system(cmdStr);