From 14e44a36be59b9e5bedf7b26f044e94883f72899 Mon Sep 17 00:00:00 2001 From: SnickerSun Date: Thu, 31 Oct 2024 22:35:51 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0mkota=5Fsingle=5Fuser.sh=20?= =?utf8?q?=E7=9A=84=20ota=5Fall=5Fdiff=20=E5=8F=82=E6=95=B0=EF=BC=8C?= =?utf8?q?=E5=88=B6=E4=BD=9Capplication=20diff=20ota=20=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../brandy/build_brandy_update.py | 18 +++++++++++++++++- mkota_single_user.sh | 6 +++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/code/sdk/build/config/target_config/brandy/build_brandy_update.py b/code/sdk/build/config/target_config/brandy/build_brandy_update.py index b74bde4fd..88fc612f6 100755 --- a/code/sdk/build/config/target_config/brandy/build_brandy_update.py +++ b/code/sdk/build/config/target_config/brandy/build_brandy_update.py @@ -31,6 +31,8 @@ class upg_base_info: # 产品升级配置文件 if os.path.exists(os.path.join(self.root_path,"output","ota_diff")) : self.fota_cfg = os.path.join(self.root_path, "build", "config", "target_config", "brandy", "fota", "fota_app_diff.cfg") + elif os.path.exists(os.path.join(self.root_path,"output","ota_all_diff")) : + self.fota_cfg = os.path.join(self.root_path, "build", "config", "target_config", "brandy", "fota", "fota_app_diff.cfg") else: self.fota_cfg = os.path.join(self.root_path, "build", "config", "target_config", "brandy", "fota", "fota.cfg") @@ -120,6 +122,14 @@ def get_new_image(info): image_list.append("=".join([info.bt_bin, "bt"])) image_list.append("=".join([info.dsp_main_bin, "dsp_main"])) image_list.append("=".join([info.dsp_overlay_bin, "dsp_overlay"])) + elif os.path.exists(os.path.join(info.root_path,"output","ota_all_diff")) : + print( os.path.join(info.root_path,"output","ota_all_diff")+" exist ") + image_list.append("=".join([info.ssb_bin, "ssb"])) + image_list.append("=".join([info.recovery_bin, "recovery"])) + image_list.append("=".join([info.app_bin, "application"])) + image_list.append("=".join([info.bt_bin, "bt"])) + image_list.append("=".join([info.dsp_main_bin, "dsp_main"])) + image_list.append("=".join([info.dsp_overlay_bin, "dsp_overlay"])) elif os.path.exists(os.path.join(info.root_path,"output","ota_all_with_nv")) : print( os.path.join(info.root_path,"output","ota_all_with_nv")+" exist ") image_list.append("=".join([info.ssb_bin, "ssb"])) @@ -174,6 +184,12 @@ def get_old_image(info): image_list.append("=".join([info.bt_old_bin, "bt"])) image_list.append("=".join([info.dsp_main_old_bin, "dsp_main"])) image_list.append("=".join([info.dsp_overlay_old_bin, "dsp_overlay"])) + elif os.path.exists(os.path.join(info.root_path,"output","ota_all_diff")) : + print( os.path.join(info.root_path,"output","ota_all_diff")+" exist ") + image_list.append("=".join([info.app_old_bin, "application"])) + image_list.append("=".join([info.bt_old_bin, "bt"])) + image_list.append("=".join([info.dsp_main_old_bin, "dsp_main"])) + image_list.append("=".join([info.dsp_overlay_old_bin, "dsp_overlay"])) elif os.path.exists(os.path.join(info.root_path,"output","ota_all_with_nv")) : print( os.path.join(info.root_path,"output","ota_all_with_nv")+" exist ") image_list.append("=".join([info.app_old_bin, "application"])) @@ -183,7 +199,7 @@ def get_old_image(info): elif os.path.exists(os.path.join(info.root_path,"output","res_only")) : print("update resource only") else: - print( " ota_all or ota_all_with_nv or res_only not exist in folder "+os.path.join(info.root_path,"output")+",application only!") + print( " ota_all ota_all_diff ota_diff or ota_all_with_nv or res_only not exist in folder "+os.path.join(info.root_path,"output")+",application only!") image_list.append("=".join([info.app_old_bin, "application"])) # image_list.append("=".join([info.app_old_sign, "application_sign"])) # image_list.append("=".join([info.bt_old_sign, "bt_sign"])) diff --git a/mkota_single_user.sh b/mkota_single_user.sh index cde062ec4..1888f9f89 100644 --- a/mkota_single_user.sh +++ b/mkota_single_user.sh @@ -12,6 +12,7 @@ OTA_ALL_FLAG_PATH=$PWD/code/sdk/output/ota_all OTA_ALL_WITH_NV_FLAG_PATH=$PWD/code/sdk/output/ota_all_with_nv RES_ONLY_FLAG_PATH=$PWD/code/sdk/output/res_only OTA_DIFF_FLAG_PATH=$PWD/code/sdk/output/ota_diff +OTA_ALL_DIFF_FLAG_PATH=$PWD/code/sdk/output/ota_all_diff if [ ! -d "$PWD/code/sdk/output" ] ; then mkdir -p $PWD/code/sdk/output fi @@ -28,7 +29,7 @@ echo "" exit 0 fi -rm $OTA_ALL_FLAG_PATH $RES_ONLY_FLAG_PATH $OTA_DIFF_FLAG_PATH $OTA_ALL_WITH_NV_FLAG_PATH -f +rm $OTA_ALL_FLAG_PATH $RES_ONLY_FLAG_PATH $OTA_DIFF_FLAG_PATH $OTA_ALL_WITH_NV_FLAG_PATH $OTA_ALL_DIFF_FLAG_PATH -f if [ "$3" == "ota_all" ]; then touch $OTA_ALL_FLAG_PATH OTA_PKG_HEAD=ota_all_ @@ -38,6 +39,9 @@ OTA_PKG_HEAD=ota_all_nv_ elif [ "$3" == "ota_diff" ]; then touch $OTA_DIFF_FLAG_PATH OTA_PKG_HEAD=ota_diff_ +elif [ "$3" == "ota_all_diff" ]; then +touch $OTA_ALL_DIFF_FLAG_PATH +OTA_PKG_HEAD=ota_all_diff_ elif [ "$3" == "res_only" ]; then touch $RES_ONLY_FLAG_PATH OTA_PKG_HEAD=res_only_ -- 2.17.1