It is possible to use "lastest" as snapshot id. 86/177786/2
authorwchang kim <wchang.kim@samsung.com>
Thu, 3 May 2018 22:06:23 +0000 (07:06 +0900)
committerwchang kim <wchang.kim@samsung.com>
Fri, 4 May 2018 00:19:25 +0000 (09:19 +0900)
Change-Id: I5165139de479d0c8f2b53dcb38e080d964db9d15

.defconfig
Config.in
Makefile
support/scripts/make_image.sh
support/scripts/mk_config_from_xml.sh

index 79f1772d3905a82fb09127c83941c75cb09d25ad..3662987de82aab94cc0adc4e9f30652ad4aee5ae 100644 (file)
@@ -3,8 +3,8 @@
 # Tizen Building Block 20171210.1 Configuration
 #
 TBB_INFO_PLATFORM_VERSION_4.0=y
-# TBB_INFO_PLATFORM_VERSION_5.0 is not set
-TBB_INFO_SNAPSHOT_ID="20171210.1"
+#TBB_INFO_PLATFORM_VERSION_5.0=y
+TBB_INFO_SNAPSHOT_ID="latest"
 TBB_INFO_IMAGE_NAME="tizen-iot-img"
 TBB_SET_no_board=y
 # building-blocks-sub1-Preset_boards-ARTIK530 is not set
index 6035aacdf6a97f22e758a868eb05596a38ac0fa3..6e92ca9d46fc1eea6532b469dc6d273cab37e882 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -17,7 +17,7 @@ endchoice
 
 config TBB_INFO_SNAPSHOT_ID
        string "Snapshot ID"
-       default "20171218.2"
+       default "latest"
        help
                Snapshot ID format : yyyymmdd.n or latest
 
index 780b69a861a6b1d366df283ef5af5285fee67ca5..f6a554c7165c8a0722d99a66554c86ff34027d60 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -22,15 +22,16 @@ TBB_CONFIG = $(CONFIG_DIR)/.config
 
 -include $(TBB_CONFIG)
 
-export TBB_VERSION := 20171218.2
+export TBB_VERSION := V1.0
 export TBB_PLATFORM_VERSION := 4.0
+export TBB_SNAPSHOT_ID := latest
 
 # This is our default rule, so must come first
 TIC_CONFIG_ENV = \
        TBB_CONFIG=$(TBB_CONFIG) \
        BUILD_DIR=$(BUILD_DIR) \
        INFO_DIR=$(INFO_DIR) \
-       TBB_INFO_SNAPSHOT_ID=$(TBB_VERSION) \
+       TBB_INFO_SNAPSHOT_ID=$(TBB_SNAPSHOT_ID) \
        TBB_INFO_PLATFORM_VERSION=$(TBB_PLATFORM_VERSION) \
        TOPDIR=$(TOPDIR)
 
index 1119f9a5c7686a725adab3dfb60ded0b6ce2331b..9f3dbfc8ebf1f30ba7468faaa26371b51532670a 100755 (executable)
@@ -64,19 +64,32 @@ then
        fi
 fi
 
-echo $S_VER | grep -q "[0-9]\{8\}[.][0-9]$"
-if [ $? != 0 ]
+if [ $S_VER != "latest" ]
 then
-       echo "Invalid snapshot version : $S_VER"
-       echo "format is yyyymmdd.n"
-       exit 2
+       echo $S_VER | grep -q "[0-9]\{8\}[.][0-9]$"
+       if [ $? != 0 && $S_VER != "latest" ]
+       then
+               echo "Invalid snapshot version : $S_VER"
+               echo "format is yyyymmdd.n"
+               exit 2
+       fi
+       S_PATH=tizen-"$P_VER"unified_"$S_VER"
+else
+S_PATH=$S_VER
 fi
 
+INDEX_LOC=http://download.tizen.org/snapshots/tizen/"$P_VER"unified/"$S_PATH"/images/standard/iot-headless-2parts-armv7l-artik530_710/
+echo $INDEX_LOC
+wget -q -np -nd -P . $INDEX_LOC
+KS_FILE=`grep ks index.html | sed -e 's/^.\+\"\(tizen-.\+\)\".\+$/\1/'`
+echo $KS_FILE
+rm -f index.html
+
 
 ########## Set varaiables ##########
 ########## We use artik530 headless ks file because it is the same to rpi3 ##########
-KS_FILE=tizen-"$P_VER"unified_"$S_VER"_iot-headless-2parts-armv7l-artik530_710.ks
-KS_LOC=http://download.tizen.org/snapshots/tizen/"$P_VER"unified/tizen-"$P_VER"unified_"$S_VER"/images/standard/iot-headless-2parts-armv7l-artik530_710/"$KS_FILE"
+KS_LOC=http://download.tizen.org/snapshots/tizen/"$P_VER"unified/"$S_PATH"/images/standard/iot-headless-2parts-armv7l-artik530_710/"$KS_FILE"
+
 
 DOWNDIR=$TBB_INFO_DL_DIR
 if [ "x$BUILD_DIR" = "x" ]
index 03a24cd1275f0e554a47fef1a041dcabef9bbc8b..ca3a513c7d811ab7780d221986299f32a160e97f 100755 (executable)
@@ -30,7 +30,13 @@ P_VER=""
 else
 P_VER=${TBB_INFO_PLATFORM_VERSION}-
 fi
+
+
+if [ $TBB_INFO_SNAPSHOT_ID = "latest" ] ; then
 S_VER=$TBB_INFO_SNAPSHOT_ID
+else
+S_VER="tizen-${P_VER}unified_${TBB_INFO_SNAPSHOT_ID}"
+fi
 
 if [ -e $TOPDIR/advanced/${TBB_INFO_SNAPSHOT_ID}_$1_${TBB_INFO_PLATFORM_VERSION} ]
 then
@@ -55,8 +61,7 @@ then
        XMLNAME="base.xml"
        RESULTFILE=$DOWNDIR/Config_$OUT_TYPE.in
 else
-       http://download.tizen.org/snapshots/tizen/${P_VER}unified/tizen-${P_VER}unified_${S_VER}/repos/standard/packages/repodata/
-       DOWN_URL="http://download.tizen.org/snapshots/tizen/${P_VER}unified/tizen-${P_VER}unified_${S_VER}/repos/standard/packages/repodata/"
+       DOWN_URL="http://download.tizen.org/snapshots/tizen/${P_VER}unified/${S_VER}/repos/standard/packages/repodata/"
        XMLNAME="unified.xml"
        RESULTFILE=$DOWNDIR/Config_$OUT_TYPE.in
 fi