From 31ef12a5596f3ec1bdcd3decc80c0fda080ae47a Mon Sep 17 00:00:00 2001 From: David Ferguson Date: Sat, 10 May 2014 12:46:01 -0400 Subject: [PATCH] msm8660: support SC-* model numbers in radio assertion * needed for quincydcm (SC-05D) * quincydcm radio blobs have "SGH-" strings within them which requires us to search for "SC-" first and then "SGH-" to avoid using the wrong model number in the radio version search. Change-Id: Ibbc444f64fe328088f04950770d5da27c976cc13 --- test_radio_version.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/test_radio_version.sh b/test_radio_version.sh index 85afaea6..c78cf316 100755 --- a/test_radio_version.sh +++ b/test_radio_version.sh @@ -38,14 +38,21 @@ rmdir $MOUNT_POINT # Determine the radio model # -# There is a string with "SGH-" followed by the model -# Examples: SGH-I727 SGH-I727R SGH-T989D +# There is a string with "SGH-" or "SC-" followed by the model +# Examples: SGH-I727 SGH-I727R SGH-T989D SC-05D +# +# Search for "SC-" first since "SGH-" also appears in SC-05D radio +# blobs. The radio version begins with "SC" so therefore we need to +# ignore the "SGH-" result. echo "Searching radio image for model..." -RADIO_MODEL=`strings $IMAGE_TO_CHECK | grep -E ^SGH- -m 1 | cut -d - -f 2` +RADIO_MODEL=`strings $IMAGE_TO_CHECK | grep -E ^SC- -m 1 | sed -e 's/-//'` if [ "$RADIO_MODEL" == "" ]; then - ui_print "ERROR: Could not determine the radio model." - rm $IMAGE_TO_CHECK - exit 1 + RADIO_MODEL=`strings $IMAGE_TO_CHECK | grep -E ^SGH- -m 1 | cut -d - -f 2` + if [ "$RADIO_MODEL" == "" ]; then + ui_print "ERROR: Could not determine the radio model." + rm $IMAGE_TO_CHECK + exit 1 + fi fi ui_print "Found radio model: $RADIO_MODEL" @@ -56,7 +63,7 @@ ui_print "Found radio model: $RADIO_MODEL" # model name, followed by four or five capital letters, # followed by either a number (1-9) or a capital letter # Examples: I727UCMC1 I727UCLL3 I727UCLK4 I727RUXUMA7 -# T989UVLE1 I757MUGMC5 +# T989UVLE1 I757MUGMC5 SC05DOMMSG SC05DOMMSI echo "Searching radio image for version..." RADIO_VERSION=`strings $IMAGE_TO_CHECK | grep -E ^$RADIO_MODEL[A-Z]{4,5}[A-Z1-9]$ -m 1` if [ "$RADIO_VERSION" == "" ]; then