From 7194d83937e602a057cb16798de56a7b63339c3b Mon Sep 17 00:00:00 2001 From: SnickerSun Date: Tue, 18 Jun 2024 21:04:37 +0800 Subject: [PATCH] =?utf8?q?=E5=9C=A8=20mkota.sh=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?utf8?q?=20ota=5Fall=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- 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