From 3b205ad3690da9577397d486cb559b233eb60478 Mon Sep 17 00:00:00 2001 From: "snickersun@163.com" Date: Tue, 18 Jun 2024 13:06:08 +0000 Subject: [PATCH] Merge #315 into sdk602patch0521 from refs/changes/315/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 在 mkota.sh中添加 ota_all参数 * refs/changes/315/head: (1 commits squashed) - 在 mkota.sh中添加 ota_all参数 Signed-off-by: snickersun@163.com Reviewed-by: snickersun@163.com Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/315 --- mkota.sh | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) 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 -- 2.17.1