summaryrefslogtreecommitdiff
path: root/tct
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2016-10-26 16:28:29 +0200
committerAleksander Mistewicz <a.mistewicz@samsung.com>2017-03-29 12:48:09 +0200
commitf9edd7ad740beadcc4ed84f702ce6e8d5b435d92 (patch)
treec8b00cbc0574ce14b010c4e13d2208ffcfac298a /tct
parent9cc8862f8b1b9968460d4e9d1b9c50a030544d32 (diff)
downloadmajor-f9edd7ad740beadcc4ed84f702ce6e8d5b435d92.tar.gz
major-f9edd7ad740beadcc4ed84f702ce6e8d5b435d92.tar.bz2
major-f9edd7ad740beadcc4ed84f702ce6e8d5b435d92.zip
Add tct/flash/flash_dd_artik.sh
Add params_artik10.bin and params_artik5.bin Add replace_params() to tct/prepare/prepare.sh Change-Id: If5fe1278432924c56cc83b6e0422d43f8fa7640a Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tct')
-rwxr-xr-xtct/flash/flash_dd_artik.sh51
-rw-r--r--tct/prepare/params_artik10.binbin0 -> 16384 bytes
-rw-r--r--tct/prepare/params_artik5.binbin0 -> 16384 bytes
-rwxr-xr-xtct/prepare/prepare.sh9
4 files changed, 60 insertions, 0 deletions
diff --git a/tct/flash/flash_dd_artik.sh b/tct/flash/flash_dd_artik.sh
new file mode 100755
index 0000000..515682b
--- /dev/null
+++ b/tct/flash/flash_dd_artik.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# script for flashing SD card using dd for ARTIK
+# the layout is:
+# * boot.img -> 1st partition
+# * modules.img -> 2nd partition
+# * rootfs.img -> 3rd partition
+# * systemd-data.img -> 5th partition
+# * user.img -> 6th partition
+#
+# script always checks for block device availability
+# files are taken from CWD
+# there are no checks if files exist, dd should fail
+#
+# SD card should be prepared using script mk_sdboot available at:
+# https://github.com/tizen-artik/sdboot
+#
+# Author: Aleksander Mistewicz <a.mistewicz@samsung.com>
+
+TESTLAB_SCRIPTS="$(CDPATH='' cd -- "$(dirname -- "$0")"/.. && pwd -P)"
+
+. "${TESTLAB_SCRIPTS}/common.sh"
+
+test -n "${1}" || die "Too few arguments!"
+
+sdd="sudo dd bs=1M"
+test -b "${1}1" || die "No ${1}1"
+$sdd if=boot.img "of=${1}1"
+test -b "${1}2" || die "No ${1}2"
+$sdd if=modules.img "of=${1}2"
+test -b "${1}3" || die "No ${1}3"
+$sdd if=rootfs.img "of=${1}3"
+test -b "${1}5" || die "No ${1}5"
+$sdd if=system-data.img "of=${1}5"
+test -b "${1}6" || die "No ${1}6"
+$sdd if=user.img "of=${1}6"
+sync
diff --git a/tct/prepare/params_artik10.bin b/tct/prepare/params_artik10.bin
new file mode 100644
index 0000000..df88e8c
--- /dev/null
+++ b/tct/prepare/params_artik10.bin
Binary files differ
diff --git a/tct/prepare/params_artik5.bin b/tct/prepare/params_artik5.bin
new file mode 100644
index 0000000..bb4a82c
--- /dev/null
+++ b/tct/prepare/params_artik5.bin
Binary files differ
diff --git a/tct/prepare/prepare.sh b/tct/prepare/prepare.sh
index 120e007..24a8d8d 100755
--- a/tct/prepare/prepare.sh
+++ b/tct/prepare/prepare.sh
@@ -52,6 +52,15 @@ set_usb_mode() {
"${IMAGE_MOUNTPOINT}/usr/lib/systemd/system/deviced.service"
}
+replace_params() {
+ test -n "${TESTLAB_SCRIPTS}" || die "Missing env: testlab_scripts!"
+ IMAGE_MOUNTPOINT="$1"
+ ARTIK_MODEL="$2"
+ test -n "${IMAGE_MOUNTPOINT}" || die "Missing argument: image_mountpoint!"
+ test -n "${ARTIK_MODEL}" || die "Missing argument: artik_model!"
+ sudo cp "${TESTLAB_SCRIPTS}/prepare/params_${ARTIK_MODEL}" "${IMAGE_MOUNTPOINT}/params.bin"
+}
+
unpack_image() {
test $# -ge 2 || die "Too few arguments!"
eval DESTINATION=\$$#