From db6172bd2db4fdf8122eef9c9896210d00140ec4 Mon Sep 17 00:00:00 2001 From: Martin Kepplinger Date: Wed, 18 Apr 2018 17:27:23 +0200 Subject: [PATCH] flashrom_rpi_top_write.sh: Minor fix --- flashrom_rpi_top_write.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flashrom_rpi_top_write.sh b/flashrom_rpi_top_write.sh index eae85a2..8614d49 100755 --- a/flashrom_rpi_top_write.sh +++ b/flashrom_rpi_top_write.sh @@ -77,7 +77,7 @@ if [ ! "$INPUT_IMAGE_SIZE" -eq "$reference_filesize" ] ; then exit 1 fi -echo "verifying SPI connection by reading" +echo "verifying SPI connection by reading 2 times. please wait." TEMP_DIR=`mktemp -d` if [[ ! "$TEMP_DIR" || ! -d "$TEMP_DIR" ]]; then echo "Could not create temp dir" @@ -87,8 +87,8 @@ flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=128 -c ${CHIPNAME} -r ${TEMP_D flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=128 -c ${CHIPNAME} -r ${TEMP_DIR}/test2.rom cmp --silent ${TEMP_DIR}/test1.rom ${TEMP_DIR}/test2.rom if [ "$have_backupname" -gt 0 ] ; then - mv ${TEMP_DIR}/test1.rom ${BACKUPNAME} - echo "current image saved as ${BACKUPIMAGE}" + cp ${TEMP_DIR}/test1.rom ${BACKUPNAME} + echo "current image saved as ${BACKUPNAME}" fi TEMP_SIZE=$(wc -c <"$TEMP_DIR/test1.rom") if [ ! "$INPUT_IMAGE_SIZE" -eq "$TEMP_SIZE" ] ; then