From 131baa6e911404a61067bea1470474690c656004 Mon Sep 17 00:00:00 2001 From: Martin Kepplinger Date: Wed, 3 Apr 2019 13:43:12 +0200 Subject: [PATCH] x230: top: support detection for EN25QH32 This feels like the last piece of the puzzle in chip-detection. Fixes #82 --- x230/external_install_top.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/x230/external_install_top.sh b/x230/external_install_top.sh index 38754d0..d8849bb 100755 --- a/x230/external_install_top.sh +++ b/x230/external_install_top.sh @@ -165,10 +165,20 @@ if [ ! "$have_chipname" -gt 0 ] ; then CHIPNAME="" chip_found=0 - CHIPNAME=$(cat "${TEMP_DIR}"/chips | grep Found | grep MX25L3206E | grep -oP '"\K[^"\047]+(?=["\047])' || true) - if [ ! -z "${CHIPNAME}" ] ; then - chip_found=1 + if [ ! "$chip_found" -gt 0 ] ; then + CHIPNAME=$(cat "${TEMP_DIR}"/chips | grep Found | grep MX25L3206E | grep -oP '"\K[^"\047]+(?=["\047])' || true) + if [ ! -z "${CHIPNAME}" ] ; then + chip_found=1 + fi fi + + if [ ! "$chip_found" -gt 0 ] ; then + CHIPNAME=$(cat "${TEMP_DIR}"/chips | grep Found | grep EN25QH32 | grep -oP '"\K[^"\047]+(?=["\047])' || true) + if [ ! -z "${CHIPNAME}" ] ; then + chip_found=1 + fi + fi + if [ ! "$chip_found" -gt 0 ] ; then echo "chip not detected." flashrom -p ${programmer} || true