Browse Source

x230: fix flashrom chipname detection

We've had a double-quote issue there
pull/36/head
Martin Kepplinger 6 years ago
parent
commit
c629d4eaf7
2 changed files with 6 additions and 6 deletions
  1. +3
    -3
      x230/external_install_bottom.sh
  2. +3
    -3
      x230/external_install_top.sh

+ 3
- 3
x230/external_install_bottom.sh View File

@ -145,7 +145,7 @@ if [ ! "$have_chipname" -gt 0 ] ; then
CHIPNAME="" CHIPNAME=""
chip_found=0 chip_found=0
CHIPNAME=$(cat "${TEMP_DIR}"/chips | grep Found | grep "MX25L6406E/MX25L6408E" | grep -o '".*"' || true)
CHIPNAME=$(cat "${TEMP_DIR}"/chips | grep Found | grep "MX25L6406E/MX25L6408E" | grep -oP '"\K[^"\047]+(?=["\047])' || true)
if [ ! -z "${CHIPNAME}" ] ; then if [ ! -z "${CHIPNAME}" ] ; then
chip_found=1 chip_found=1
fi fi
@ -191,8 +191,8 @@ if [ "$me_clean" -gt 0 ] ; then
fi fi
echo "Start reading 2 times. Please be patient..." echo "Start reading 2 times. Please be patient..."
flashrom -p ${programmer} -c "${CHIPNAME}" -r "${TEMP_DIR}"/test1.rom
flashrom -p ${programmer} -c "${CHIPNAME}" -r "${TEMP_DIR}"/test2.rom
flashrom -p ${programmer} -c ${CHIPNAME} -r "${TEMP_DIR}"/test1.rom
flashrom -p ${programmer} -c ${CHIPNAME} -r "${TEMP_DIR}"/test2.rom
cmp --silent "${TEMP_DIR}"/test1.rom "${TEMP_DIR}"/test2.rom cmp --silent "${TEMP_DIR}"/test1.rom "${TEMP_DIR}"/test2.rom
if [ "$have_backupname" -gt 0 ] ; then if [ "$have_backupname" -gt 0 ] ; then
cp "${TEMP_DIR}"/test1.rom "${BACKUPNAME}" cp "${TEMP_DIR}"/test1.rom "${BACKUPNAME}"


+ 3
- 3
x230/external_install_top.sh View File

@ -160,7 +160,7 @@ if [ ! "$have_chipname" -gt 0 ] ; then
CHIPNAME="" CHIPNAME=""
chip_found=0 chip_found=0
CHIPNAME=$(cat "${TEMP_DIR}"/chips | grep Found | grep "MX25L3206E" | grep -o '".*"' || true)
CHIPNAME=$(cat "${TEMP_DIR}"/chips | grep Found | grep MX25L3206E | grep -oP '"\K[^"\047]+(?=["\047])' || true)
if [ ! -z "${CHIPNAME}" ] ; then if [ ! -z "${CHIPNAME}" ] ; then
chip_found=1 chip_found=1
fi fi
@ -184,8 +184,8 @@ if [ ! "$INPUT_IMAGE_SIZE" -eq "$reference_filesize" ] ; then
fi fi
echo "verifying SPI connection by reading 2 times. please wait." echo "verifying SPI connection by reading 2 times. please wait."
flashrom -p ${programmer} -c "${CHIPNAME}" -r "${TEMP_DIR}"/test1.rom
flashrom -p ${programmer} -c "${CHIPNAME}" -r "${TEMP_DIR}"/test2.rom
flashrom -p ${programmer} -c ${CHIPNAME} -r ${TEMP_DIR}/test1.rom
flashrom -p ${programmer} -c ${CHIPNAME} -r ${TEMP_DIR}/test2.rom
cmp --silent "${TEMP_DIR}"/test1.rom "${TEMP_DIR}"/test2.rom cmp --silent "${TEMP_DIR}"/test1.rom "${TEMP_DIR}"/test2.rom
if [ "$have_backupname" -gt 0 ] ; then if [ "$have_backupname" -gt 0 ] ; then
cp "${TEMP_DIR}"/test1.rom "${BACKUPNAME}" cp "${TEMP_DIR}"/test1.rom "${BACKUPNAME}"


Loading…
Cancel
Save