diff --git a/code/application/source/cardv/SrcCode/System/SysMain_Exe.c b/code/application/source/cardv/SrcCode/System/SysMain_Exe.c index 0ec1eeb50..604baf7fa 100755 --- a/code/application/source/cardv/SrcCode/System/SysMain_Exe.c +++ b/code/application/source/cardv/SrcCode/System/SysMain_Exe.c @@ -227,15 +227,15 @@ INT32 System_OnBoot(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray) Load_MenuInfo(); #endif #else -#if (BOOT_RESET_MENU_INFO == ENABLE) - //EMMC_AS_PSTORE - #if (defined(_CPU2_LINUX_) && defined(_EMBMEM_EMMC_)) - System_OnStrgInit_PS(); //because ps uses filesys in this case, so ps init was moved here. - Load_MenuInfo(); - #else - Load_MenuInfo(); //reset value cause the FL_FSStatus as '0', we do so before NVTEVT_STRG_ATTACH finish - #endif -#endif +// #if (BOOT_RESET_MENU_INFO == ENABLE) +// //EMMC_AS_PSTORE +// #if (defined(_CPU2_LINUX_) && defined(_EMBMEM_EMMC_)) +// System_OnStrgInit_PS(); //because ps uses filesys in this case, so ps init was moved here. +// Load_MenuInfo(); +// #else +// Load_MenuInfo(); //reset value cause the FL_FSStatus as '0', we do so before NVTEVT_STRG_ATTACH finish +// #endif +// #endif #endif //#NT#2016/12/14#Niven Cho -end #if (BOOT_RESET_MENU_INFO == ENABLE) diff --git a/code/application/source/cardv/SrcCode/System/SysMain_cmd.c b/code/application/source/cardv/SrcCode/System/SysMain_cmd.c index 814ef68dd..868b25067 100755 --- a/code/application/source/cardv/SrcCode/System/SysMain_cmd.c +++ b/code/application/source/cardv/SrcCode/System/SysMain_cmd.c @@ -281,6 +281,7 @@ SXCMD_ITEM("uiprint %", sf_cmd_para_printf, "uiprint") SXCMD_ITEM("blusw %", cmd_blu_switch, "blusw 0/1") SXCMD_ITEM("wifisw %", cmd_wifi_switch, "wifisw 0/1") SXCMD_ITEM("lcdbk %", sf_set_backlight_status, "lcdbk 0/1") +SXCMD_ITEM("sfdump %", sf_vos_perf_list_dump, "sfdump") #endif #if FS_MULTI_STRG_FUNC /* test cmd */ diff --git a/code/application/source/cardv/SrcCode/System/main.c b/code/application/source/cardv/SrcCode/System/main.c index 38f2c5cc8..8d94cf74d 100755 --- a/code/application/source/cardv/SrcCode/System/main.c +++ b/code/application/source/cardv/SrcCode/System/main.c @@ -388,6 +388,7 @@ int NvtMain(void) { #if HUNTING_CAMERA_MCU == ENABLE sf_cardv_check_power_on_mode(); + sf_cardv_load_menu_info_start(); #endif System_InstallID(); #if (USB_MODE==ENABLE) diff --git a/code/lib/source/sifar/code/include/sf_common.h b/code/lib/source/sifar/code/include/sf_common.h index 4694c25be..45c796223 100755 --- a/code/lib/source/sifar/code/include/sf_common.h +++ b/code/lib/source/sifar/code/include/sf_common.h @@ -202,4 +202,6 @@ void sf_set_cammode_statu(char is); BOOL sf_set_backlight_status(unsigned char argc, char **argv); UINT8 sf_get_net_generation(void); void sf_set_net_generation(UINT8 value); +UINT32 sf_cardv_load_menu_info_start(void); +BOOL sf_vos_perf_list_dump(unsigned char argc, char **argv); #endif diff --git a/code/lib/source/sifar/code/source/common/sf_common.c b/code/lib/source/sifar/code/source/common/sf_common.c index 668eb0c87..d235ece84 100755 --- a/code/lib/source/sifar/code/source/common/sf_common.c +++ b/code/lib/source/sifar/code/source/common/sf_common.c @@ -134,6 +134,12 @@ static SF_THREAD_S WaiParaTskCfg = .IsRun = 0, .TskId = -1, }; + +static SF_THREAD_S LoadParaTskCfg = +{ + .IsRun = 0, + .TskId = -1, +}; int sf_pir_statu_read(void) { static UINT8 state = 0; @@ -3453,4 +3459,42 @@ void sf_set_net_generation(UINT8 value) { printf("[%s:%d]value(%d) invalid,no set.\n", __FUNCTION__, __LINE__, value); } +} + +void* sf_cardv_load_menu_info_thread(void *arg) +{ + vos_perf_list_mark(__func__, __LINE__, 0); + SLOGI("thread run\n"); + LoadParaTskCfg.IsRun = 1; + Load_MenuInfo(); + SLOGI("thread end\n"); + + LoadParaTskCfg.IsRun = 0; + vos_perf_list_mark(__func__, __LINE__, 0); + return NULL; +} +UINT32 sf_cardv_load_menu_info_start(void) +{ + SINT32 ret = 1; + if(LoadParaTskCfg.IsRun) + { + SLOGE("thread has already run !!!\n"); + return 1; + } + ret = pthread_create(&LoadParaTskCfg.TskId, NULL, sf_cardv_load_menu_info_thread, NULL); + if(ret != SF_SUCCESS) + { + MLOGD("thread creat fail!\n"); + return ret; + } + return SF_SUCCESS; + +} + +BOOL sf_vos_perf_list_dump(unsigned char argc, char **argv) +{ + vos_perf_list_dump(); + sleep(1); + system("dmesg"); + return TRUE; } \ No newline at end of file