From: SnickerSun Date: Tue, 18 Jun 2024 13:04:37 +0000 (+0800) Subject: 在 mkota.sh中添加 ota_all参数 X-Git-Tag: release_V1.2.70_20241020_135402~983^2~5 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F315%2Fhead;p=mirrors%2FFD230.git 在 mkota.sh中添加 ota_all参数 --- diff --git a/mkota.sh b/mkota.sh index a66485370..2720097ef 100755 --- a/mkota.sh +++ b/mkota.sh @@ -8,7 +8,7 @@ TARGET_VERSION=`basename $TARGET_DIR` 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 if [ ! -d "$SOURCE_DIR" ] ; then echo "$SOURCE_DIR not exist , skip create ota package" echo "" @@ -20,6 +20,13 @@ echo "" exit 0 fi +if [ "$3" == "ota_all" ]; then +touch $OTA_ALL_FLAG_PATH +else +rm $OTA_ALL_FLAG_PATH -f +fi + + mkdir code/sdk/output/brandy/TestOTA/ -p rm -rf code/sdk/output/brandy/TestOTA/* @@ -67,12 +74,15 @@ cd $PWD/code/sdk/ cd - mkdir release/ota -p -cp code/sdk/output/brandy/TestOTA/upgrade/update.fwpkg release/ota/${SOURCE_VERSION}_2_${TARGET_VERSION}_ota.fwpkg -echo create ota file release/ota/${SOURCE_VERSION}_2_${TARGET_VERSION}_ota.fwpkg done +target_fwpkg_filepath=release/ota/${SOURCE_VERSION}_2_${TARGET_VERSION}_ota.fwpkg +cp code/sdk/output/brandy/TestOTA/upgrade/update.fwpkg $target_fwpkg_filepath +fwpkg_filesize=`ls $target_fwpkg_filepath -lh|awk '{print $5}'` + +echo create ota file $target_fwpkg_filepath $fwpkg_filesize done else echo "" -echo "usage: $0 source_release target_release " +echo "usage: $0 source_release target_release [ota_all]" echo "" fi