alarm/firmware-brcm43xx: Support for Wandboard

Instead of hard coding the TTY, guess it or use whatever is defined in the conf file.
This commit is contained in:
Jeffrey Clark 2014-05-25 13:34:15 -05:00
parent e7b19bb206
commit a80ddeb00c
2 changed files with 19 additions and 2 deletions

View file

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

View file

@ -37,9 +37,26 @@ if [ "$a" = "0x4330" ] ; then
EXTRA="--no2bytes --enable_lpm --tosleep=50000 "
fi
# UART TTY can be different for each board
# FIXME: Possibly test each port with hciattach (-n)?
# For now, just use the highest port as it works for current boards
if [ -z "$TTY" ]; then
TTYS=($( ls -r1 /dev/ttymxc? ))
for t in "${TTYS[@]}" ; do
ttynum=${t:0-1}
if [ $ttynum -eq 0 ]; then
echo "Abort: UART ttymcx0 does not seem right."
exit 1
else
TTY=$t
break
fi
done
fi
if [ -n "$HCD" ] ; then
echo "Found chip version $a."
/usr/bin/brcm_patchram_plus -d --patchram /usr/lib/firmware/brcm/$HCD --baudrate 3000000 --use_baudrate_for_download /dev/ttymxc3 --enable_hci $EXTRA $MAC_OPTIONS &
/usr/bin/brcm_patchram_plus -d --patchram /usr/lib/firmware/brcm/$HCD --baudrate 3000000 --use_baudrate_for_download ${TTY} --enable_hci $EXTRA $MAC_OPTIONS &
else
echo " No device Found."
exit 1