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:
commit
ba60a3f1a9
|
@ -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/");
|
||||
if (dirp != NULL)
|
||||
|
@ -118,7 +119,7 @@ static BOOL sf_is_4g_module_usb_update_file_exist(UINT8 *updateFname)
|
|||
|
||||
closedir(dirp);
|
||||
//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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1244,23 +1244,25 @@ UINT32 sf_4g_update(UINT8 *upFname)
|
|||
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(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 {
|
||||
sprintf(cmdStr, "/usr/bin/QFirehose-EG91 -f %s",upFname);
|
||||
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);
|
||||
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) {
|
||||
ret = system(cmdStr);
|
||||
if (sf_poweron_type_get() == SF_MCU_STARTUP_RING) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user