1.无升级包不重启--预处理,暂时不修改
This commit is contained in:
		
							parent
							
								
									5156752c1a
								
							
						
					
					
						commit
						f6375d1e30
					
				|  | @ -2261,7 +2261,19 @@ BOOL sf_ota_result(void) | |||
| 	return TRUE; | ||||
| } | ||||
| #endif | ||||
| int sf_ch_fw_file(void) | ||||
| { | ||||
| 	FST_FILE hFile = NULL; | ||||
| 
 | ||||
| 	hFile = FileSys_OpenFile(FW_UPDATE_NAME, FST_OPEN_READ); | ||||
| 
 | ||||
| 	if (hFile == 0) { | ||||
| 		SLOGE("cannot find %s\r\n", FW_UPDATE_NAME); | ||||
| 		return 0; | ||||
| 	} | ||||
|     FileSys_CloseFile(hFile); | ||||
|     return 1; | ||||
| } | ||||
| void* sf_sys_do_upgrade(void *arg) | ||||
| { | ||||
|     //int s32Ret = 0;
 | ||||
|  | @ -2274,6 +2286,9 @@ void* sf_sys_do_upgrade(void *arg) | |||
|     if(sf_cardv_battery_value_get() < 40){ | ||||
|         sf_sys_status_led_set(SF_LED_SYS_STATE_ERROR); | ||||
|     } | ||||
|     // else if(0 == sf_ch_fw_file()){
 | ||||
|     //     sf_set_fw_update(0);
 | ||||
|     // }
 | ||||
|     else{ | ||||
|         sf_mcu_reg_set(SF_MCU_SOFT_UPDATE, 1); | ||||
|         //sf_set_fw_update(1);
 | ||||
|  |  | |||
|  | @ -813,6 +813,8 @@ void insmod(void) | |||
| 			vos_task_resume(vkt_capture); | ||||
| 			VK_TASK_HANDLE vkt_display = vos_task_create(fastboot_thread, insmod_display, "init_display", 10, DEFAULT_STASK_SIZE); | ||||
| 			vos_task_resume(vkt_display); | ||||
|             // VK_TASK_HANDLE vkt_storage = vos_task_create(fastboot_thread, insmod_storage, "init_storage", 10, DEFAULT_STASK_SIZE);
 | ||||
| 			// vos_task_resume(vkt_storage);
 | ||||
| 			VK_TASK_HANDLE vkt_decoder = vos_task_create(fastboot_thread, insmod_decoder, "init_decoder", 10, DEFAULT_STASK_SIZE); | ||||
| 			vos_task_resume(vkt_decoder); | ||||
| 		} | ||||
|  |  | |||
|  | @ -846,6 +846,14 @@ static int make_bootargs(LINUXTMP_PARTITION *p_linuxtmp, unsigned int bootts_beg | |||
| 	//static char bootargs[] = "root=/dev/ram0 rootfstype=ramfs rdinit=/linuxrc bootts=568047,1720128 resume_addr=0x00007e88 user_debug=0xff";
 | ||||
| #if HUNTING_CAMERA_MCU == ENABLE | ||||
|     char PowerOnModeStr[32] = {'\0'}; | ||||
|     // if(sf_in_update())
 | ||||
|     // {
 | ||||
|     //     if(fastboot_wait_done_timeout(BOOT_INIT_FILESYSOK, FASTBOOT_WAIT_FILESYS_TIMEOUT_MS) != E_OK){
 | ||||
|     //     {
 | ||||
|              | ||||
|     //     }
 | ||||
|     // }
 | ||||
| 
 | ||||
|     snprintf(PowerOnModeStr, sizeof(PowerOnModeStr), "Mode=%d UpFw=%d mcu=%d",sf_get_power_on_mode(), sf_in_update() , sf_in_mcu_update()); | ||||
|     linuxboot_set_extra_bootarg(PowerOnModeStr); | ||||
| #endif | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 payton
						payton