//RAMDISK.delta for recovery FS.
#ifdef SS_RECOVERYRAMDISK
-int verify_RecoveryDelta_IMG(int part_idx)
+int verify_RecoveryDelta_IMG(int part_idx, int update_type)
{
int ret = SUCCESS;
ua_dataSS_t ua_dataSS;
ua_dataSS.update_delta=ua_delta_info;
ua_dataSS.ua_operation = UI_OP_SCOUT;
ua_dataSS.ui_progress = fota_gui_progress;
-
- if (ua_update_data->ua_delta_path != NULL) {
- ret = SS_IMGVerfiyPartition(&ua_dataSS);
+ if (update_type == FULL_IMG) {
+ if (ua_update_data->ua_delta_path != NULL){
+ ret = SUCCESS;
+ fota_gui_progress(&ua_dataSS, 100);
}
-
+ } else if (update_type == DELTA_IMG) {
+ if (ua_update_data->ua_delta_path != NULL) {
+ ret = SS_IMGVerfiyPartition(&ua_dataSS);
+ }
+ }
return ret;
}
else if (update_type == DELTA_FS)
ret = verify_Delta_FS(part_idx);
else if (update_type == EXTRA)
- ret = verify_RecoveryDelta_IMG(part_idx);
+ ret = verify_RecoveryDelta_IMG(part_idx, FULL_IMG);
else
ret = -1;
else if (update_type == DELTA_FS)
ret = update_Delta_FS(part_idx, ui32Operation);
else if (update_type == EXTRA) //TOTA
- ret = update_RecoveryDelta_IMG(part_idx, DELTA_IMG);
+ ret = update_RecoveryDelta_IMG(part_idx, FULL_IMG);
else
ret = -1;
#define BOTA0_DEV "/dev/mmcblk0p1"
+#define RAMDISK_PATH "/opt/usr/data/fota"
#define FOTA_GUI_INTERFACE "/usr/bin/fota_gui_test"
#define FOTA_GUI_MAIN "/usr/bin/fota_gui"
}
#ifdef SS_RECOVERYRAMDISK
-int verify_RecoveryDelta_IMG(int part_idx)
+int verify_RecoveryDelta_IMG(int part_idx, int update_type)
{
int ret = SUCCESS;
ua_dataSS_t ua_dataSS;
ua_dataSS.update_delta=ua_delta_info;
ua_dataSS.ua_operation = UI_OP_SCOUT;
ua_dataSS.ui_progress = fota_gui_progress;
- if (ua_update_data->ua_delta_path != NULL) {
- ret = SS_IMGVerfiyPartition(&ua_dataSS);
+ if (update_type == FULL_IMG) {
+ if (ua_update_data->ua_delta_path != NULL){
+ ret = SUCCESS;
+ fota_gui_progress(&ua_dataSS, 100);
+ }
+ } else if (update_type == DELTA_IMG) {
+ if (ua_update_data->ua_delta_path != NULL) {
+ ret = SS_IMGVerfiyPartition(&ua_dataSS);
}
+ }
return ret;
}
//ua_dataSS.update_data.ua_temp_path =
if (ua_update_data->ua_delta_path != NULL && ua_dataSS.update_data->ua_temp_path) {
- snprintf(ua_dataSS.update_data->ua_temp_path, MAX_FILE_PATH, "%s/fota_temp_%s", delta_folder, ua_dataSS.parti_info->ua_parti_name);
+ snprintf(ua_dataSS.update_data->ua_temp_path, MAX_FILE_PATH, "%s/%s", RAMDISK_PATH, ua_dataSS.parti_info->ua_parti_name);
LOG("update_RecoveryDelta_IMG() [%s] temp path [%s]\n", ua_dataSS.parti_info->ua_parti_name,ua_dataSS.update_data->ua_temp_path);
ret = SS_IMGUpdatemain(&ua_dataSS, update_type); //PASS temp path whr file has to be written, Once written it should be UNLINKED after upgrade.
}
else if (update_type == DELTA_FS)
ret = verify_Delta_FS(part_idx);
else if (update_type == EXTRA)
- ret = verify_RecoveryDelta_IMG(part_idx);
+ ret = verify_RecoveryDelta_IMG(part_idx, FULL_IMG);
else
ret = -1;