summaryrefslogtreecommitdiff
path: root/tsp/scripts
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2016-07-28 11:35:16 (GMT)
committerAleksander Mistewicz <a.mistewicz@samsung.com>2016-12-06 15:37:14 (GMT)
commit701a3e68224e4556c237174c4386005d67d14101 (patch)
tree54b02fa625e2d9626504f1e60bf7563d543fa67d /tsp/scripts
parent361c4a60c3a7fa1915052cfa545b3eff1831bdeb (diff)
downloadmajor-701a3e68224e4556c237174c4386005d67d14101.zip
major-701a3e68224e4556c237174c4386005d67d14101.tar.gz
major-701a3e68224e4556c237174c4386005d67d14101.tar.bz2
Add artik support to tsp/scripts/download_image.pyrefs/changes/34/81834/12
Supported target configurations: * odroid, minnow32, minnow64 (unchanged) * headless-artik5, artik5, headless-artik10, artik10 (new) Change-Id: Idf46f15e633fab34ed8bd9de71934ac2fd3293b8 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tsp/scripts')
-rwxr-xr-xtsp/scripts/download_image.py67
1 files changed, 44 insertions, 23 deletions
diff --git a/tsp/scripts/download_image.py b/tsp/scripts/download_image.py
index 33e3158..c795a91 100755
--- a/tsp/scripts/download_image.py
+++ b/tsp/scripts/download_image.py
@@ -27,7 +27,7 @@ import urllib2
import argparse
import logging
-__version__ = "1.0.0"
+__version__ = "1.1.0"
__license__ = "APACHE-2.0"
__author__ = "Aleksander Mistewicz"
__author_email__ = "a.mistewicz@samsung.com"
@@ -111,25 +111,43 @@ class ImageDownloader:
logging.debug('snapshot number: %s', self.snap_nr)
logging.debug('version number: %s', self.ver_nr)
- if "odroid" == self.target:
+ if "odroid" == self.target or "artik" in self.target:
self.BASE_ARM_WAYLAND = "images/arm-wayland/"
- self.BOOT_NAME = "common-boot-armv7l-odroidu3"
- self.USR_NAME = "common-wayland-3parts-armv7l-odroidu3"
-
- odroid_common_boot_prefix = self.url + self.BASE_ARM_WAYLAND + self.BOOT_NAME
- self.odroid_boot_path = odroid_common_boot_prefix \
+ if "odroid" == self.target:
+ self.BOOT_NAME = "common-boot-armv7l-odroidu3"
+ self.USR_NAME = "common-wayland-3parts-armv7l-odroidu3"
+ elif "artik" in self.target:
+ if "artik5" in self.target:
+ self.BOOT_NAME = "common-boot-armv7l-artik5"
+ self.artik_boot_type = "artik5"
+ elif "artik10" in self.target:
+ self.BOOT_NAME = "common-boot-armv7l-artik10"
+ self.artik_boot_type = "artik10"
+ else:
+ logging.error("Target %s must be either artik5 or artik10 type", self.target)
+
+ if "headless" in self.target:
+ self.USR_NAME = "common-headless-3parts-armv7l-artik"
+ self.artik_usr_type = "headless"
+ else:
+ self.USR_NAME = "common-wayland-3parts-armv7l-artik"
+ self.artik_usr_type = "wayland"
+
+ arm_common_boot_prefix = self.url + self.BASE_ARM_WAYLAND + self.BOOT_NAME
+ self.arm_boot_path = arm_common_boot_prefix \
+ "/tizen-common_" + self.ver_nr + "_" + self.BOOT_NAME
- self.odroid_boot_path_md5 = odroid_common_boot_prefix + "/MD5SUMS"
+ self.arm_boot_path_md5 = arm_common_boot_prefix + "/MD5SUMS"
- odroid_common_usr_prefix = self.url + self.BASE_ARM_WAYLAND + self.USR_NAME
- self.odroid_usr_path = odroid_common_usr_prefix \
+ arm_common_usr_prefix = self.url + self.BASE_ARM_WAYLAND + self.USR_NAME
+ self.arm_usr_path = arm_common_usr_prefix \
+ "/tizen-common_" + self.ver_nr + "_" + self.USR_NAME
- self.odroid_usr_path_md5 = odroid_common_usr_prefix + "/MD5SUMS"
- self.odroid_snap_pkgs = "http://download.tizen.org/snapshots/tizen/common/tizen-common_" \
+ self.arm_usr_path_md5 = arm_common_usr_prefix + "/MD5SUMS"
+ self.arm_snap_pkgs = "http://download.tizen.org/snapshots/tizen/common/tizen-common_" \
+ self.snap_nr + "/" + self.BASE_ARM_WAYLAND + self.USR_NAME \
+ "/tizen-common_" + self.snap_nr + "_" + self.USR_NAME + ".packages"
- logging.debug('odroid (boot path): %s', self.odroid_boot_path)
- logging.debug('odroid (usr path): %s', self.odroid_usr_path)
+
+ logging.debug('arm (boot path): %s', self.arm_boot_path)
+ logging.debug('arm (usr path): %s', self.arm_usr_path)
elif "minnow" in self.target:
if target == "minnow32":
self.BASE_MINNOW_WAYLAND = "images/ia32-wayland/"
@@ -150,8 +168,8 @@ class ImageDownloader:
logging.error("Unkonown target %s", self.target)
def run(self):
- if "odroid" == self.target:
- self.odroid()
+ if "odroid" == self.target or "artik" in self.target:
+ self.arm()
elif "minnow" in self.target:
self.minnow()
else:
@@ -216,18 +234,21 @@ class ImageDownloader:
break
time.sleep(60)
- def odroid(self):
- logging.debug("Downloading images for: odroid")
- self.create_projectconf("armv7l", "Odroid U3")
+ def arm(self):
+ logging.debug("Downloading images for: arm")
+ if "odroid" == self.target:
+ self.create_projectconf("armv7l", "Odroid U3")
+ elif "artik" in self.target:
+ self.create_projectconf("armv7l", self.artik_usr_type + ' ' + self.artik_boot_type)
if not self.is_prerelease:
self.write_diff_for_snapshot()
else:
- if self.check_diff(self.fetch_url(self.odroid_usr_path + ".packages"), \
- self.fetch_url(self.odroid_snap_pkgs)):
+ if self.check_diff(self.fetch_url(self.arm_usr_path + ".packages"), \
+ self.fetch_url(self.arm_snap_pkgs)):
return
logging.debug("Downloading images...")
- self.get([self.odroid_boot_path + ".tar.gz"], self.odroid_boot_path_md5)
- self.get([self.odroid_usr_path + ".tar.gz"], self.odroid_usr_path_md5)
+ self.get([self.arm_boot_path + ".tar.gz"], self.arm_boot_path_md5)
+ self.get([self.arm_usr_path + ".tar.gz"], self.arm_usr_path_md5)
def minnow(self):
logging.debug("Downloading images for: minnowboard")