int optimus_burn_package_in_sdmmc(const char* sdc_cfg_file) { int rcode = 0; #if defined(CONFIG_AML_MESON_8) AML_WATCH_DOG_DISABLE(); //disable watchdog #endif//#ifdef CONFIG_AML_MESON_8 DWN_MSG("mmcinfo\n"); rcode = run_command("mmcinfo", 0); if(rcode){ DWN_ERR("Fail in init mmc, Does sdcard not plugged in?\n"); return __LINE__; } #if 0//this asserted by 'run update' and 'aml_check_is_ready_for_sdc_produce' rcode = do_fat_get_fileSz(sdc_cfg_file); if(!rcode){ printf("The [%s] not exist in bootable mmc card\n", sdc_cfg_file); return __LINE__; } #endif//#if 0 rcode = optimus_burn_with_cfg_file(sdc_cfg_file); return rcode; }
int optimus_burn_package_in_sdmmc(const char* sdc_cfg_file) { int rcode = 0; #if 0//this asserted by 'run update' and 'aml_check_is_ready_for_sdc_produce' rcode = do_fat_get_fileSz(sdc_cfg_file); if (!rcode) { printf("The [%s] not exist in bootable mmc card\n", sdc_cfg_file); return __LINE__; } #endif//#if 0 rcode = optimus_device_probe("mmc", "0"); if (rcode) { DWN_ERR("Fail to detect device mmc 0\n"); return __LINE__; } setenv("usb_update","0"); rcode = optimus_burn_with_cfg_file(sdc_cfg_file); return rcode; }