Browse Source

rename flashrom_rpi_write to flashrom_rpi_top_write and add 4M check

pull/35/head
Martin Kepplinger 6 years ago
parent
commit
b7d4c6a069
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      flashrom_rpi_top_write.sh

flashrom_rpi_write.sh → flashrom_rpi_top_write.sh View File

@ -71,6 +71,11 @@ fi
INPUT_IMAGE_NAME=$(basename ${INPUT_IMAGE_PATH}) INPUT_IMAGE_NAME=$(basename ${INPUT_IMAGE_PATH})
INPUT_IMAGE_SIZE=$(wc -c <"$INPUT_IMAGE_PATH") INPUT_IMAGE_SIZE=$(wc -c <"$INPUT_IMAGE_PATH")
reference_filesize=4194304
if [ ! "$INPUT_IMAGE_SIZE" -eq "$reference_filesize" ] ; then
echo "Error: input file must be 4MB of size"
exit 1
fi
echo "verifying SPI connection by reading" echo "verifying SPI connection by reading"
TEMP_DIR=`mktemp -d` TEMP_DIR=`mktemp -d`

Loading…
Cancel
Save