From d944c146d0e2287fa1ea74d6f24a19b9822d7e89 Mon Sep 17 00:00:00 2001 From: Sunmin Lee Date: Fri, 8 Sep 2017 09:04:47 +0900 Subject: [PATCH] upgrade-automation.sh: get update package directly Simplify the interface of upgrade automation script to use update pacakge (delta.tar) directly rather than find it. Change-Id: Id997275659e427d88f41de77783f6bf544316ed8 Signed-off-by: Sunmin Lee --- scripts/upgrade-automation.sh | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/scripts/upgrade-automation.sh b/scripts/upgrade-automation.sh index bfc0e31..82b43d5 100755 --- a/scripts/upgrade-automation.sh +++ b/scripts/upgrade-automation.sh @@ -3,11 +3,6 @@ # Upgrade Automation Script # (Tizen 4.0 Upgrade) # -# Preconditions -# * tota-upg -# * This script should accompany below script: -# write-version.sh -# # Upgrade procedure # 1. Download images (old, new) # 2. Download old image to target @@ -20,23 +15,19 @@ #---------------------------------------------------------# # Get argument -if [ $# -lt 2 ]; then - echo "Usage: upgrade-automation.sh TOTA_UPG_PATH TARGET" - echo " TARGET> rpi3 | tw1" +if [ $# -lt 1 ]; then + echo "Usage: upgrade-automation.sh UPDATE_PACKAGE" exit fi -TOTA_UPG_PATH=$1 -TARGET=$2 -TOTA_UPG_TARGET=${TOTA_UPG_PATH}/mk_delta/${TARGET} +UPKG=$1 TOTA_DIR=/opt/usr/data/fota sdb root on sdb shell mkdir -p ${TOTA_DIR} # 4. Download delta to target -DELTA_DIR=$(ls -1d ${TOTA_UPG_TARGET}/result/* | tail -1) -sdb push ${DELTA_DIR}/FW_DELTA/delta.tar ${TOTA_DIR} +sdb push ${UPKG} ${TOTA_DIR}/delta.tar # 5. Execute upgrade manager sdb shell tar xvfp ${TOTA_DIR}/delta.tar -C ${TOTA_DIR} upgrade-trigger.sh -- 2.7.4