summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2017-11-07 16:14:04 +0100
committerAleksander Mistewicz <a.mistewicz@samsung.com>2017-11-09 14:46:45 +0100
commit5768a3744a75b0ae397b683df0c2b06c608cc249 (patch)
treeb3cd10d1ba1a7812f1550b98cb7980f5252f93c1
parent2dcb2f6d3d7a91d055c7b8a0d6576817970e1515 (diff)
downloadmajor-5768a3744a75b0ae397b683df0c2b06c608cc249.tar.gz
major-5768a3744a75b0ae397b683df0c2b06c608cc249.tar.bz2
major-5768a3744a75b0ae397b683df0c2b06c608cc249.zip
Use U-boot flash scripts instead of dd
Change-Id: Ibaeb630e55761c45cadfe9c9669235230660ebaa
-rwxr-xr-xtct/common.sh1
-rwxr-xr-xtct/flash/flash_dd_rpi3-2parts.sh51
-rwxr-xr-xtct/flash/flash_dd_rpi3.sh48
-rwxr-xr-xtct/rpi3_prepare_flash_conf.sh12
4 files changed, 3 insertions, 109 deletions
diff --git a/tct/common.sh b/tct/common.sh
index 5990121..de21475 100755
--- a/tct/common.sh
+++ b/tct/common.sh
@@ -36,6 +36,7 @@ MAX_SLEEP=160
TL_IP_CONF="/etc/opt/testlab-major/ip_addr"
SCREENSHOOTER_RPM="/opt/screenshooter.rpm"
ARTIK_FLASH_SCRIPT="/opt/sdboot/mk_sdboot.sh"
+RPI3_FLASH_SCRIPT="/opt/u-boot/scripts/tizen/sd_fusing_rpi3.sh"
BMAP_TIME_LIMIT="600"
diff --git a/tct/flash/flash_dd_rpi3-2parts.sh b/tct/flash/flash_dd_rpi3-2parts.sh
deleted file mode 100755
index 992aa37..0000000
--- a/tct/flash/flash_dd_rpi3-2parts.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-
-# Copyright (c) 2017 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
-# the layout is:
-# * boot.img -> 1st partition
-# * ramdisk.img -> 2nd partition
-# * systemd-data.img -> 3rd partition
-# * rootfs.img -> 5th partition
-# * modules.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 mkpart.sh available at:
-# https://wiki.tizen.org/wiki/Quick_guide_for_odroid#Fuse_bootloader_image
-#
-# 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=4096"
-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=ramdisk.img "of=${1}2"
-test -b "${1}3" || die "No ${1}3"
-$sdd if=system-data.img "of=${1}3"
-test -b "${1}5" || die "No ${1}5"
-$sdd if=rootfs.img "of=${1}5"
-test -b "${1}6" || die "No ${1}6"
-$sdd if=modules.img "of=${1}6"
-sync
diff --git a/tct/flash/flash_dd_rpi3.sh b/tct/flash/flash_dd_rpi3.sh
deleted file mode 100755
index cc5d6a5..0000000
--- a/tct/flash/flash_dd_rpi3.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-
-# Copyright (c) 2015 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
-# the layout is:
-# * boot.img -> 1st partition
-# * rootfs.img -> 2nd partition
-# * systemd-data.img -> 3rd partition
-# * modules.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 mkpart.sh available at:
-# https://wiki.tizen.org/wiki/Quick_guide_for_odroid#Fuse_bootloader_image
-#
-# 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=4096"
-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=rootfs.img "of=${1}2"
-test -b "${1}3" || die "No ${1}3"
-$sdd if=system-data.img "of=${1}3"
-test -b "${1}6" || die "No ${1}6"
-$sdd if=modules.img "of=${1}6"
-sync
diff --git a/tct/rpi3_prepare_flash_conf.sh b/tct/rpi3_prepare_flash_conf.sh
index 44520af..5895229 100755
--- a/tct/rpi3_prepare_flash_conf.sh
+++ b/tct/rpi3_prepare_flash_conf.sh
@@ -51,16 +51,8 @@ UUID_FILE="/var/tmp/uuid-${SDMUX}"
DEV_SDCARD=$(uuid2dev "${UUID_FILE}" "${SDMUX}") || die "sdcard not found!"
cd "${IMAGE_UNPACKED}"
-case "$IMAGE" in
- *2parts*)
- check_parts "$DEV_SDCARD" 1 2 3 6
- "${TESTLAB_SCRIPTS}/flash/flash_dd_rpi3-2parts.sh" "${DEV_SDCARD}"
- ;;
- *)
- check_parts "$DEV_SDCARD" 1 2 3 5 6
- "${TESTLAB_SCRIPTS}/flash/flash_dd_rpi3.sh" "${DEV_SDCARD}"
- ;;
-esac
+sudo "$RPI3_FLASH_SCRIPT" -d "${DEV_SDCARD}" -b "${BOOT_IMAGE}" &&\
+ sudo "$RPI3_FLASH_SCRIPT" -d "${DEV_SDCARD}" -b "${IMAGE}"
RET=$?
cd "${OLDPWD}"