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
b273595fde
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
#用于gitlab-ci.yml编译使用
|
||||
|
||||
#make app_clean
|
||||
make app_clean
|
||||
|
||||
echo "Start compile."
|
||||
export ROOT_PATH=$PWD
|
||||
|
@ -9,7 +9,7 @@ export ROOT_PATH=$PWD
|
|||
cd rtos
|
||||
source build/envsetup.sh
|
||||
lunch rtos cfg_565_HUNTING_EVB_LINUX_4G_S550 gcc-6.5-newlib-2.4-2019.11-arm-ca9-eabihf
|
||||
#make clean
|
||||
make clean
|
||||
make all > /dev/null
|
||||
cp output/application.bin ../
|
||||
cp output/rtos-main.bin ../
|
||||
|
@ -18,7 +18,7 @@ cp output/rtos-main.bin ../
|
|||
cd $ROOT_PATH
|
||||
source build/envsetup.sh
|
||||
lunch Linux cfg_565_HUNTING_EVB_LINUX_4G_S550 arm-ca9-linux-uclibcgnueabihf-8.4.01
|
||||
#make clean
|
||||
make clean
|
||||
make all > /dev/null
|
||||
|
||||
cd $ROOT_PATH
|
||||
|
|
|
@ -326,11 +326,6 @@ SF_ST_MMC_DEV *SF_StrgCheckWorkableDev(void)
|
|||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 2; i++)
|
||||
{
|
||||
sf_mmc_dev[i]->dev_type = workable_dev;
|
||||
}
|
||||
|
||||
if(workable_dev == MMC_DEV_NO)
|
||||
{
|
||||
//MLOGD("Strg Check, No dev can use\n");
|
||||
|
@ -338,13 +333,13 @@ SF_ST_MMC_DEV *SF_StrgCheckWorkableDev(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
sf_mmc_dev[workable_dev]->dev_type = workable_dev;
|
||||
//MLOGD("Strg Check, workable_dev = %d\n", workable_dev);
|
||||
SF_SetMMCDev(sf_mmc_dev[workable_dev]);
|
||||
return sf_mmc_dev[workable_dev];
|
||||
}
|
||||
}
|
||||
|
||||
#if 1
|
||||
static int sfStrgOnActionSendCurrentDev(SF_ST_MMC_DEV *pMMCDev)
|
||||
{
|
||||
SF_MESSAGE_BUF_S stMessageBuf = {0};
|
||||
|
@ -356,7 +351,6 @@ static int sfStrgOnActionSendCurrentDev(SF_ST_MMC_DEV *pMMCDev)
|
|||
MLOGD("sf sys strg update current dev!\n");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void* mmc_monitoring_thread(void *arg)
|
||||
{
|
||||
|
|
|
@ -807,6 +807,48 @@ INT32 System_OnStrgSetActDrive(VControl *pCtrl, UINT32 paramNum, UINT32 *paramAr
|
|||
return NVTEVT_CONSUME;
|
||||
}
|
||||
|
||||
int search_str_in_file(char *path, char *str)
|
||||
{
|
||||
FILE *fp = NULL;
|
||||
UINT32 u32ize = 0;
|
||||
int found = 0;
|
||||
char *pStrSrc = NULL;
|
||||
|
||||
fp = fopen(path, "r");
|
||||
if (fp) {
|
||||
fseek(fp, 0, SEEK_END);
|
||||
u32ize = ftell(fp); // take file size
|
||||
fseek(fp, 0, SEEK_SET); // move to position zero
|
||||
pStrSrc = (char *)malloc(u32ize * sizeof(char));
|
||||
|
||||
if (pStrSrc) {
|
||||
fread(pStrSrc, 1, u32ize, fp);
|
||||
if (strstr(pStrSrc, str)) {
|
||||
found = 1;
|
||||
}
|
||||
free(pStrSrc);
|
||||
}
|
||||
|
||||
fclose(fp);
|
||||
fp = NULL;
|
||||
pStrSrc = NULL;
|
||||
u32ize = 0;
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
int System_check_mmcblk0p1(void)
|
||||
{
|
||||
SysMain_system("ls /dev/mmcblk0p1 > /tmp/lsdev.txt");
|
||||
vos_util_delay_ms(100);
|
||||
if (search_str_in_file("/tmp/lsdev.txt", "/dev/mmcblk0p1")) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
INT32 System_OnStrgInsert(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
||||
{
|
||||
UINT32 strg_id = paramArray[0];
|
||||
|
@ -853,6 +895,31 @@ INT32 System_OnStrgInsert(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
|||
//SysMain_system("df"); //only for debug, the "/mnt/sd" path must be existed.
|
||||
#endif
|
||||
|
||||
/* wait mmcblk */
|
||||
if(strg_id == STRG_ID_SD){
|
||||
|
||||
UINT32 count = 0 , delay = 50, timeout = 60;
|
||||
|
||||
while(count++ < timeout)
|
||||
{
|
||||
if (System_check_mmcblk0p1()){
|
||||
break;
|
||||
}
|
||||
else{
|
||||
vos_util_delay_ms(delay);
|
||||
}
|
||||
}
|
||||
|
||||
if(System_check_mmcblk0p1()){
|
||||
/* hotplug */
|
||||
if(count != 1)
|
||||
vos_util_delay_ms(50);
|
||||
}
|
||||
else{
|
||||
DBG_ERR("mmcblk0p1 not found!\n");
|
||||
}
|
||||
}
|
||||
|
||||
if(strg_id == STRG_ID_SD){
|
||||
DX_HANDLE pStrgDev = (DX_HANDLE)sdio_getStorageObject(STRG_OBJ_FAT1);
|
||||
if (GxStrg_OpenDevice(strg_id, pStrgDev) != TRUE) {
|
||||
|
|
|
@ -3854,7 +3854,7 @@ INT32 PhotoExe_OnCallback(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
|||
DBG_IND("[cb]NVTEVT_ALGMSG_JPGOK\r\n");
|
||||
|
||||
// add picture count 1
|
||||
UI_SetData(FL_TakePictCnt, UI_GetData(FL_TakePictCnt) + 1);
|
||||
//UI_SetData(FL_TakePictCnt, UI_GetData(FL_TakePictCnt) + 1);
|
||||
localInfo->IsJPGok = TRUE;
|
||||
#if (FS_FUNC == ENABLE)
|
||||
localInfo->isFolderFull = UIStorageCheck(STORAGE_CHECK_FOLDER_FULL, NULL);
|
||||
|
|
Binary file not shown.
|
@ -695,9 +695,9 @@ static void qr_page_task_cb(lv_task_t* task){
|
|||
{
|
||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||
printf("[qr_page_task_cb]is esim card...%s\n", puiPara->ModuleImei);
|
||||
if (strlen(puiPara->SimIccid) == 0 || strlen(puiPara->ModuleImei) == 0)
|
||||
if (strlen(puiPara->SimIccid) == 0 && strlen(puiPara->ModuleImei) == 0)
|
||||
{
|
||||
lv_label_set_text(labelInit, "Please restart the camera");
|
||||
lv_label_set_text(labelInit, "\nPlease restart the camera");
|
||||
return;
|
||||
}
|
||||
snprintf(qr_date, QR_DATA_LENGTH, qr_code_str, puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, "true");
|
||||
|
@ -706,9 +706,9 @@ static void qr_page_task_cb(lv_task_t* task){
|
|||
{
|
||||
UIMenuStoreInfo *puiPara = sf_ui_para_get();
|
||||
printf("[qr_page_task_cb]is sim card...%s\n", puiPara->ModuleImei);
|
||||
if (strlen(puiPara->SimIccid) == 0 || strlen(puiPara->ModuleImei) == 0)
|
||||
if (strlen(puiPara->SimIccid) == 0 && strlen(puiPara->ModuleImei) == 0)
|
||||
{
|
||||
lv_label_set_text(labelInit, "Please restart the camera");
|
||||
lv_label_set_text(labelInit, "\nPlease restart the camera");
|
||||
return;
|
||||
}
|
||||
snprintf(qr_date, QR_DATA_LENGTH, qr_code_str, puiPara->ModuleImei, puiPara->SimIccidV, puiPara->SimIccidA, "false");
|
||||
|
@ -786,9 +786,10 @@ void show_qr_picture_page(lv_obj_t* obj)
|
|||
lv_obj_set_hidden(qr_info_msgbox, false);
|
||||
labelInit = lv_label_create(qr_info_msgbox, label_msg_scr_uiflowwrnmsg);
|
||||
lv_obj_add_style(labelInit, 0, &gMatrixStylebtn);
|
||||
//lv_label_set_align(labelInit, LV_LABEL_ALIGN_CENTER);
|
||||
//lv_obj_align(labelInit, qr_info_msgbox, LV_ALIGN_CENTER, 0, -30);
|
||||
lv_obj_align(labelInit, qr_info_msgbox, 0, 0, -30);
|
||||
lv_label_set_align(labelInit, LV_LABEL_ALIGN_CENTER);
|
||||
lv_obj_align(labelInit, qr_info_msgbox, LV_ALIGN_CENTER, 0, -30);
|
||||
|
||||
if (sf_cardv_get_sim_insert() == 0){
|
||||
lv_label_set_text(labelInit, "Please insert the SIM card and restart the camera");
|
||||
}
|
||||
|
|
|
@ -319,6 +319,10 @@ void Option_play_Selection_Key(lv_obj_t* obj, uint32_t key)
|
|||
UIFlowMenuCommonConfirmAPI_Open(IDM_DELETE_THIS);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
lv_obj_set_hidden(no_file_msgbox, false);
|
||||
}
|
||||
}
|
||||
else //GO TO STORAGE OPTIONS
|
||||
{
|
||||
|
@ -1303,9 +1307,9 @@ static void UIFlowPlay_ScrOpen(lv_obj_t* obj)
|
|||
no_file_msgbox = lv_btn_create(obj, button_msg_bg_scr_uiflowwrnmsg);
|
||||
lv_obj_set_hidden(no_file_msgbox, true);
|
||||
is_no_file = 0;
|
||||
label_msgbox = lv_label_create(no_file_msgbox, label_msg_scr_uiflowwrnmsg);
|
||||
label_msgbox = lv_label_create(no_file_msgbox, label_msg_scr_uiflowwrnmsg);
|
||||
lv_obj_align(label_msgbox, no_file_msgbox, 0, 0, 0);
|
||||
lv_label_set_align(label_msgbox, LV_LABEL_ALIGN_CENTER);
|
||||
lv_obj_align(label_msgbox, no_file_msgbox, LV_ALIGN_CENTER, 0, 0);
|
||||
lv_label_set_text(label_msgbox, "No File");
|
||||
}
|
||||
|
||||
|
|
|
@ -502,28 +502,25 @@ void Load_MenuInfo(void)
|
|||
if(Check_OTA() == TRUE){
|
||||
DBG_DUMP("OTA success, reset system param\n");
|
||||
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
if(sf_get_ui_para_flag())
|
||||
{
|
||||
if(!sf_is_usb_flag())
|
||||
{
|
||||
sf_mcu_reg_set(SF_MCU_SOFT_UPDATE, 0);
|
||||
}
|
||||
memcpy(&origInfo, ¤tInfo, sizeof(currentInfo));
|
||||
memcpy(&origInfo_check, ¤tInfo, sizeof(currentInfo));
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
// #if HUNTING_CAMERA_MCU == ENABLE
|
||||
// if(sf_get_ui_para_flag())
|
||||
// {
|
||||
// if(!sf_is_usb_flag())
|
||||
// {
|
||||
// sf_mcu_reg_set(SF_MCU_SOFT_UPDATE, 0);
|
||||
// }
|
||||
// memcpy(&origInfo, ¤tInfo, sizeof(currentInfo));
|
||||
// memcpy(&origInfo_check, ¤tInfo, sizeof(currentInfo));
|
||||
// return;
|
||||
// }
|
||||
// #endif
|
||||
|
||||
SysResetFlag();
|
||||
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
sf_power_on_para_check_init();
|
||||
if(sf_is_usb_flag())
|
||||
{
|
||||
Save_MenuInfo();
|
||||
}
|
||||
else
|
||||
Save_MenuInfo();
|
||||
if(!sf_is_usb_flag())
|
||||
{
|
||||
sf_mcu_reg_set(SF_MCU_SOFT_UPDATE, 0);
|
||||
}
|
||||
|
@ -1132,9 +1129,9 @@ EXIT:
|
|||
sum);
|
||||
|
||||
#if HUNTING_CAMERA_MCU == ENABLE
|
||||
//origInfo = currentInfo;
|
||||
//origInfo_check = currentInfo;
|
||||
//sf_share_mem_customer_down(0);
|
||||
memcpy(&origInfo, ¤tInfo, sizeof(currentInfo));
|
||||
memcpy(&origInfo_check, ¤tInfo, sizeof(currentInfo));
|
||||
sf_share_mem_customer_down(0);
|
||||
#endif
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -712,9 +712,9 @@ static SINT32 sf_app_process_cmd_SD(SF_MESSAGE_BUF_S *pMessageBuf)
|
|||
{
|
||||
sfStrgDevSdHandler(pMessageBuf->arg1, pMessageBuf->arg2, pMessageBuf->arg3);
|
||||
}
|
||||
//else if(pMessageBuf->arg2 == MMC_DEV_EMMC)
|
||||
else if(pMessageBuf->arg2 == MMC_DEV_EMMC)
|
||||
{
|
||||
//sfStrgDevEmmcHandler(pMessageBuf->arg1, pMessageBuf->arg2, pMessageBuf->arg3);
|
||||
sfStrgDevEmmcHandler(pMessageBuf->arg1, pMessageBuf->arg2, pMessageBuf->arg3);
|
||||
}
|
||||
|
||||
switch(pMessageBuf->arg1)
|
||||
|
|
|
@ -649,9 +649,11 @@ BOOL sf_load_bt_ko(void)
|
|||
{
|
||||
BOOL ret2 = TRUE;
|
||||
int ret = 0;
|
||||
char cmd[70] = {'\0'};
|
||||
MLOGI("start.\n");
|
||||
|
||||
ret = system("modprobe rtk_btusb");
|
||||
snprintf(cmd, sizeof(cmd), "insmod %s/kernel/drivers/bluetooth/rtk_btusb.ko", driver_path_prefix);
|
||||
ret = system(cmd);
|
||||
//ret = system("modprobe rtk_btusb");
|
||||
if(0 != ret)
|
||||
{
|
||||
ret2 = FALSE;
|
||||
|
|
|
@ -1627,6 +1627,10 @@ void* sf_app_mcu_updata_thread(void *arg)
|
|||
char *file_path = sf_root_path_strcat(UPGRADE_FIRMWARE_NANE);
|
||||
if(file_path == NULL)
|
||||
{
|
||||
MLOGI(" sf_power_off_msg_to_cardv\n");
|
||||
MLOGE("MCU_UPGRADE no file\n");
|
||||
sf_set_mcu_update_flag(0);
|
||||
sf_power_off_msg_to_cardv();
|
||||
return NULL;
|
||||
}
|
||||
ret = Fw_GetFirmwareSize(file_path, &McuFsize);
|
||||
|
|
Binary file not shown.
|
@ -284,7 +284,7 @@ void sf_mode_detect(void)
|
|||
}
|
||||
else if((sf_get_pir_statu_flag()) && (CMD_FORMAT_SD_STA != sf_get_card_statu()))
|
||||
{
|
||||
//printf("[sf_mode_detect][*x] empezar going to pir................................\n");
|
||||
printf("[sf_mode_detect]start going to pir...\n");
|
||||
pwroffcnt++;
|
||||
//printf("[%s:%d]pwroffcnt=%d\n",__FUNCTION__,__LINE__,pwroffcnt);
|
||||
//sf_enter_auto_mode_count_down_show(4 - pwroffcnt);
|
||||
|
@ -348,7 +348,7 @@ void sf_mode_detect(void)
|
|||
}
|
||||
else */if(AutoOfftime == KeepAliveTime_s - 1)
|
||||
{
|
||||
sf_set_pir_statu_flag(TRUE);
|
||||
//sf_set_pir_statu_flag(TRUE);
|
||||
//countDownOffFlg = 0;
|
||||
//sf_sys_status_led_set(SF_LED_SYS_STATE_GOING_TO_PIR);
|
||||
}
|
||||
|
|
|
@ -103,6 +103,7 @@ MV_KO_LIST=(\
|
|||
/lib/modules/$KERVER/kernel/drivers/usb/class/cdc-wdm.ko \
|
||||
/lib/modules/$KERVER/kernel/drivers/net/usb/qmi_wwan.ko \
|
||||
/lib/modules/$KERVER/extra/fs/exfat/exfat.ko \
|
||||
/lib/modules/$KERVER/kernel/drivers/bluetooth/rtk_btusb.ko \
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -3395,7 +3395,7 @@ INT32 PhotoExe_OnCallback(VControl *pCtrl, UINT32 paramNum, UINT32 *paramArray)
|
|||
DBG_IND("[cb]NVTEVT_ALGMSG_JPGOK\r\n");
|
||||
|
||||
// add picture count 1
|
||||
UI_SetData(FL_TakePictCnt, UI_GetData(FL_TakePictCnt) + 1);
|
||||
//UI_SetData(FL_TakePictCnt, UI_GetData(FL_TakePictCnt) + 1);
|
||||
localInfo->IsJPGok = TRUE;
|
||||
#if (FS_FUNC == ENABLE)
|
||||
localInfo->isFolderFull = UIStorageCheck(STORAGE_CHECK_FOLDER_FULL, NULL);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user