From 4204309872da5cb401cbb2729d9e2d4869a87f42 Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Thu, 22 Oct 2020 14:58:56 +0900 Subject: agl-basesystem 0.1 --- .../meta-updater-raspberrypi/scripts/flash-image.sh | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'external/meta-updater-raspberrypi/scripts') diff --git a/external/meta-updater-raspberrypi/scripts/flash-image.sh b/external/meta-updater-raspberrypi/scripts/flash-image.sh index ef59eb37..aa4187b3 100755 --- a/external/meta-updater-raspberrypi/scripts/flash-image.sh +++ b/external/meta-updater-raspberrypi/scripts/flash-image.sh @@ -51,15 +51,12 @@ if [ -z "$1" ]; then echo " Usage: ./flash-configured-image.sh device [imagefile [force]]" echo "" echo "" - echo " device : The device name to flash. Must be a removable device." + echo " device : The device name to flash. Should be a removable device." echo " Example: sdb" echo "" echo " imagefile : An image file generated by bitbake (optional)." echo " Default: ./tmp/deploy/images/raspberrypi3/core-image-minimal-raspberrypi3.wic" echo "" - echo " force : 1 to skip the check if device is removeable." - echo " Default: 0" - echo "" echo " The following utilities are prerequisites:" echo "" echo " dd" @@ -75,22 +72,12 @@ set -euo pipefail DEVICE_TO_FLASH=$1 IMAGE_TO_FLASH="${2-./tmp/deploy/images/raspberrypi3/core-image-minimal-raspberrypi3.wic}" -FORCE_WRITE=${3-0} -DEVICE_IS_REMOVABLE=$(cat "/sys/block/$DEVICE_TO_FLASH/removable") - -if [[ $FORCE_WRITE != "1" && $DEVICE_IS_REMOVABLE != "1" ]]; then - echo "" - echo " For safety, this script will only flash removable block devices." - echo "" - echo " This check is implemented by reading /sys/block/$DEVICE_TO_FLASH/removable." - echo "" - exit 1 -fi echo " " echo " Writing image file: $IMAGE_TO_FLASH " echo " to device : $DEVICE_TO_FLASH " echo " " +echo "Please double-check the device name!" if ask "Do you want to continue?" N; then echo " " else -- cgit 1.2.3-korg