alarm/firmware-brcm43xx: Search harder for chip version

* Fixes finding chip on wandboard (mmc1) and possibly other devices
* Gracefully fail if a chip is not found.
This commit is contained in:
Jeffrey Clark 2014-05-25 12:17:08 -05:00
parent 935b1d41f1
commit e7b19bb206
2 changed files with 12 additions and 2 deletions

View file

@ -26,7 +26,7 @@ md5sums=('bf01292eec17815baa68a83d3d7722ad'
'ff27325602dc223203adfdd23a89844b'
'8e32f9168aaa540467589c153129c57a'
'627e9612337e5ef6027a87a79c491446'
'33ec0f0cfbbdd42b933d0a2ad93f7181'
'a7f6e574bc1097f0dd7e2e14ab7c95cf'
'f2eefa2042130e559b2d664a3fcc7b50')
build() {

View file

@ -13,7 +13,17 @@ else
fi
MAC_OPTIONS="--bd_addr $MAC_ADDR"
a=`cat /sys/class/mmc_host/mmc0/mmc0\:0001/mmc0\:0001\:1/device`
# Find chip version
DEVS=($( cat /sys/class/mmc_host/mmc?/mmc?\:0001/mmc?\:0001:?/device ))
for DEV in "${DEVS[@]}"; do
if [ "${DEV:0:4}" = "0x43" ]; then
a="$DEV"
fi
done
if [ -z "$a" ]; then
echo "Failed: Unable to locate bluetooth device"
exit 1
fi
HCD=""
EXTRA=""