From c6bd8478e6cd20f0eb304aa04b372dc1b7a11004 Mon Sep 17 00:00:00 2001 From: SnickerSun Date: Sun, 29 Sep 2024 18:25:40 +0800 Subject: [PATCH] =?utf8?q?=E5=88=B6=E4=BD=9Cota=E5=8C=85=E6=97=B6=EF=BC=8C?= =?utf8?q?=E8=B5=84=E6=BA=90=E6=96=87=E4=BB=B6=E8=BF=9B=E8=A1=8C=E5=8E=8B?= =?utf8?q?=E7=BC=A9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../brandy/build_brandy_update.py | 18 ++++++++++++++++-- .../config/target_config/brandy/fota/fota.cfg | 2 +- .../brandy/fota/fota_app_diff.cfg | 2 +- mkota.sh | 6 +++++- 4 files changed, 23 insertions(+), 5 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 d3bc2f41d..ed29f2d94 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 @@ -120,12 +120,20 @@ 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_with_nv")) : + print( os.path.join(info.root_path,"output","ota_all_with_nv")+" 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"])) image_list.append("=".join([info.nv_bin, "nv"])) elif os.path.exists(os.path.join(info.root_path,"output","res_only")) : print( os.path.join(info.root_path,"output","res_only")+" exist ") print("update resource only") else: - print( "ota_all or res_only not exist in folder "+os.path.join(info.root_path,"output")+",application only!") + print( "ota_all 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_bin, "application"])) if os.path.exists(info.res_dir) : @@ -166,10 +174,16 @@ 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_with_nv")) : + print( os.path.join(info.root_path,"output","ota_all_with_nv")+" 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","res_only")) : print("update resource only") else: - print( " ota_all or res_only not exist in folder "+os.path.join(info.root_path,"output")+",application only!") + print( " ota_all 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/code/sdk/build/config/target_config/brandy/fota/fota.cfg b/code/sdk/build/config/target_config/brandy/fota/fota.cfg index 4392076b4..01ad56970 100755 --- a/code/sdk/build/config/target_config/brandy/fota/fota.cfg +++ b/code/sdk/build/config/target_config/brandy/fota/fota.cfg @@ -469,7 +469,7 @@ ImageId=0xCB9E0832 # DecompressFlag :升级镜像模式标记 # 0x3C7896E1 - compressed image # other :原始镜像不处理 -DecompressFlag=0 +DecompressFlag=0x3C7896E1 # ReRncFlag:升级镜像加密标记 # 0x3C7896E1:加密 diff --git a/code/sdk/build/config/target_config/brandy/fota/fota_app_diff.cfg b/code/sdk/build/config/target_config/brandy/fota/fota_app_diff.cfg index 7f87fa344..987436a31 100644 --- a/code/sdk/build/config/target_config/brandy/fota/fota_app_diff.cfg +++ b/code/sdk/build/config/target_config/brandy/fota/fota_app_diff.cfg @@ -469,7 +469,7 @@ ImageId=0xCB9E0832 # DecompressFlag :升级镜像模式标记 # 0x3C7896E1 - compressed image # other :原始镜像不处理 -DecompressFlag=0 +DecompressFlag=0x3C7896E1 # ReRncFlag:升级镜像加密标记 # 0x3C7896E1:加密 diff --git a/mkota.sh b/mkota.sh index 60c6b3ec2..729813b83 100755 --- a/mkota.sh +++ b/mkota.sh @@ -9,6 +9,7 @@ RES_DIR=$3 ROOTDIR=`basename $PWD` ADDITIONAL_RES_DIR=$PWD/code/sdk/output/additional_fs 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 if [ ! -d "$PWD/code/sdk/output" ] ; then @@ -27,10 +28,13 @@ echo "" exit 0 fi -rm $OTA_ALL_FLAG_PATH $RES_ONLY_FLAG_PATH $OTA_DIFF_FLAG_PATH -f +rm $OTA_ALL_FLAG_PATH $RES_ONLY_FLAG_PATH $OTA_DIFF_FLAG_PATH $OTA_ALL_WITH_NV_FLAG_PATH -f if [ "$3" == "ota_all" ]; then touch $OTA_ALL_FLAG_PATH OTA_PKG_HEAD=ota_all_ +elif [ "$3" == "ota_all_with_nv" ]; then +touch $OTA_ALL_WITH_NV_FLAG_PATH +OTA_PKG_HEAD=ota_all_nv_ elif [ "$3" == "ota_diff" ]; then touch $OTA_DIFF_FLAG_PATH OTA_PKG_HEAD=ota_diff_ -- 2.17.1