summaryrefslogtreecommitdiff
path: root/tsp/scripts
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2016-10-06 14:48:19 (GMT)
committerAleksander Mistewicz <a.mistewicz@samsung.com>2017-01-09 18:53:03 (GMT)
commit73d82e565cb7fe60e49f84eac45cdfadfcb94617 (patch)
tree67dcd8cbe0b86be6c88f112bb7ee1ce3e46dff8c /tsp/scripts
parent4934a8ae642ada596cedb304f48138636a5f33f1 (diff)
downloadmajor-73d82e565cb7fe60e49f84eac45cdfadfcb94617.zip
major-73d82e565cb7fe60e49f84eac45cdfadfcb94617.tar.gz
major-73d82e565cb7fe60e49f84eac45cdfadfcb94617.tar.bz2
Add mbr64 target supportrefs/changes/82/95282/5
mbr64 is a minimal generic x86_64 image. Database update is required. Delete it or run: . tsp/common.sh sqlite3 "${DBPATH}" -batch < tsp/results-values-device.sql Change-Id: I7f4e45b0da4afa06d662c3a6a378076a933a3130 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tsp/scripts')
-rwxr-xr-xtsp/scripts/common_prep_flash_conf.sh20
-rwxr-xr-xtsp/scripts/download_image.py33
2 files changed, 52 insertions, 1 deletions
diff --git a/tsp/scripts/common_prep_flash_conf.sh b/tsp/scripts/common_prep_flash_conf.sh
index 9350fd8..ef9a4fc 100755
--- a/tsp/scripts/common_prep_flash_conf.sh
+++ b/tsp/scripts/common_prep_flash_conf.sh
@@ -32,6 +32,10 @@ case "$TARGET" in
USR_IMG="$(pwd)/$(ls tizen-common_*_common-*-sda.raw.bz2)"
USR_IMG_BMAP="$(pwd)/$(ls tizen-common_*_common-*-sda.bmap)"
;;
+ *mbr64*)
+ USR_IMG="$(pwd)/$(ls tizen-common_*-minimal-mbr-*.tar.gz)"
+ KERNEL="$(pwd)/$(ls tizen-common_*-minimal-mbr-*-vmlinuz-*)"
+ ;;
esac
# Make sure that userspace image exists
@@ -60,6 +64,19 @@ case "$TARGET" in
"${TESTLAB_MAJOR}/tct/minnow_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG"
"${TESTLAB_MAJOR}/tct/minnow_run.sh" "$SDMUX"
;;
+ *mbr64*)
+ tar xvf "$USR_IMG"
+ qemu-system-x86_64 -m 1024 -enable-kvm -smp 2 \
+ -usb -net nic -net user -redir tcp:22122::22 \
+ -hda tizen-common.img -kernel "${KERNEL}" -serial stdio \
+ -display none \
+ -append 'console=ttyS0 root=/dev/sda rw ip=10.0.2.15::10.0.2.2:255.255.255.0::eth0:none vm_name=tizen sdb_port=26100' > vm.log &
+ QEMU_PID="$!"
+ echo "Started qemu: $(date)" > sysctl.result
+ sleep 10
+ "${TESTLAB_MAJOR}/tct/minnow_run.sh" "$SDMUX"
+ kill "${QEMU_PID}"
+ ;;
esac
if grep -q "Testing failed." sysctl.result
@@ -80,4 +97,7 @@ case "$TARGET" in
*minnow*)
rm -v "$USR_IMG" "$USR_IMG_BMAP"
;;
+ *mbr64*)
+ rm -v "$USR_IMG" "$KERNEL" tizen-common.img
+ ;;
esac
diff --git a/tsp/scripts/download_image.py b/tsp/scripts/download_image.py
index 52a4510..1ae5def 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.1.1"
+__version__ = "1.1.2"
__license__ = "APACHE-2.0"
__author__ = "Aleksander Mistewicz"
__author_email__ = "a.mistewicz@samsung.com"
@@ -177,6 +177,28 @@ class ImageDownloader:
self.snap_pkgs = "http://download.tizen.org/snapshots/tizen/common/tizen-common_" \
+ self.snap_nr + "/" + self.BASE_MINNOW_WAYLAND + self.MINNOW_NAME \
+ "/tizen-common_" + self.snap_nr + "_" + self.MINNOW_NAME + ".packages"
+ elif "mbr64" == self.target:
+ self.BASE_MBR64 = "images/x86_64-wayland/"
+ self.NAME_MBR64 = "common-minimal-mbr-x86_64"
+ self.create_projectconf("x86_64", "Qemu")
+ mbr64_common_prefix = self.url + self.BASE_MBR64 + self.NAME_MBR64
+ img_usr = str.join(mbr64_common_prefix, "/tizen-common_", self.ver_nr, "_", self.NAME_MBR64)
+
+ # Userspace image
+ self.imgs.append(img_usr + ".tar.gz")
+ md5sums = mbr64_common_prefix + "/MD5SUMS"
+ self.md5sums.append(md5sums)
+
+ # Kernel
+ kernel_name = self.get_kernel_name(md5sums)
+ if kernel_name:
+ self.imgs.append(mbr64_common_prefix + "/" + kernel_name)
+
+ # Packages
+ self.pkgs = img_usr + ".packages"
+ self.snap_pkgs = "http://download.tizen.org/snapshots/tizen/common/tizen-common_" \
+ + self.snap_nr + "/" + self.BASE_MBR64 + self.NAME_MBR64 \
+ + "/tizen-common_" + self.snap_nr + "_" + self.NAME_MBR64 + ".packages"
else:
logging.error("Unkonown target %s", self.target)
return
@@ -186,6 +208,15 @@ class ImageDownloader:
logging.debug("Package files (prerelease): %s", self.pkgs)
logging.debug("Package files (snapshot): %s", self.snap_pkgs)
+ def get_kernel_name(self, md5sums_url):
+ f = self.fetch_url(md5sums_url)
+ kernel_name = re.findall(r'tizen-common_.+vmlinuz.+', f)
+ if len(kernel_name) >= 1:
+ return kernel_name[0]
+ else:
+ logging.error("Failed to get kernel name")
+ return None
+
def run(self):
if self.dry:
logging.debug("Skipping: run")