It is possible to use "lastest" as snapshot id. 89/177789/1
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:10:19 +0000 (09:10 +0900)
Change-Id: I5165139de479d0c8f2b53dcb38e080d964db9d15

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

index 79f1772..3aed999 100644 (file)
@@ -2,9 +2,9 @@
 # Automatically generated file; DO NOT EDIT.
 # 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_4.0=y
+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 6035aac..85d24cf 100644 (file)
--- a/Config.in
+++ b/Config.in
@@ -8,16 +8,16 @@ config TBB_VERSION
 
 choice
 prompt "Platform Version"
-config TBB_INFO_PLATFORM_VERSION_4.0
-       bool "tizen-4.0"
-
 config TBB_INFO_PLATFORM_VERSION_5.0
        bool "tizen-5.0"
+
+config TBB_INFO_PLATFORM_VERSION_4.0
+       bool "tizen-4.0"
 endchoice
 
 config TBB_INFO_SNAPSHOT_ID
        string "Snapshot ID"
-       default "20171218.2"
+       default "latest"
        help
                Snapshot ID format : yyyymmdd.n or latest
 
index 780b69a..d51c8e6 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_PLATFORM_VERSION := 4.0
+export TBB_VERSION := V1.0
+export TBB_PLATFORM_VERSION := 5.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 1119f9a..92ed585 100755 (executable)
@@ -64,19 +64,31 @@ 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 03a24cd..316327d 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
@@ -138,11 +143,17 @@ then
                then
                        NAME="libstdcpp-devel"
                fi
+               if [ $NAME = "GraphicsMagick-c++-devel" ]
+               then
+                       NAME="GraphicsMagick-cpp-devel"
+               fi
+
                if [[ $NAME = *"building-blocks-"* ]]
                then
                        STATE="skip_package_state"
                        continue
                fi
+
                echo "config $NAME" >> $OUTFILE
                echo "bool \"$NAME\"" >> $OUTFILE
                STATE="package_name_state"