summaryrefslogtreecommitdiffstats
path: root/external/meta-updater-raspberrypi/scripts/flash-image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-updater-raspberrypi/scripts/flash-image.sh')
-rwxr-xr-xexternal/meta-updater-raspberrypi/scripts/flash-image.sh17
1 files changed, 2 insertions, 15 deletions
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