Skip to content

Commit

Permalink
msm8660: support SC-* model numbers in radio assertion
Browse files Browse the repository at this point in the history
  * 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
  • Loading branch information
dferg authored and blackzigong committed May 11, 2014
1 parent 7867396 commit 31ef12a
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions test_radio_version.sh
Expand Up @@ -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"

Expand All @@ -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
Expand Down

0 comments on commit 31ef12a

Please sign in to comment.