alarm/firmware-bcrm43xx: Missing conf.d file

* Install conf.d file with available variables
* New TTY and HCD conf.d vars
This commit is contained in:
Jeffrey Clark 2014-05-25 14:23:59 -05:00
parent a80ddeb00c
commit 267e94c331
3 changed files with 29 additions and 21 deletions

View file

@ -19,15 +19,17 @@ source=('https://raw.githubusercontent.com/OpenBricks/openbricks/master/packages
'https://github.com/OpenBricks/openbricks/raw/master/packages/brcm-patchram-plus/sources/bcm4330.hcd'
'https://raw.githubusercontent.com/OpenBricks/openbricks/master/packages/brcm-patchram-plus/sources/brcm_patchram_plus.c'
'start-brcm-patchram-plus'
'brcm43xx.service')
'brcm43xx.service'
'bcm43xx')
md5sums=('bf01292eec17815baa68a83d3d7722ad'
'31a9a011ce24707ed3c1024616c9005e'
'31a9a011ce24707ed3c1024616c9005e'
'ff27325602dc223203adfdd23a89844b'
'8e32f9168aaa540467589c153129c57a'
'627e9612337e5ef6027a87a79c491446'
'a60e486bb4e86635f73b4da503e393d8'
'f2eefa2042130e559b2d664a3fcc7b50')
'6011689564d6b80e886b201ff56a5e1c'
'f2eefa2042130e559b2d664a3fcc7b50'
'f5f3278bd91b1e55e93b28137c49c201')
build() {
cd "${srcdir}/"

View file

@ -0,0 +1,4 @@
MAC_ADDR=
HCD=
TTY=
EXTRA=

View file

@ -14,27 +14,25 @@ fi
MAC_OPTIONS="--bd_addr $MAC_ADDR"
# 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"
if [ -z "$HCD" ]; then
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
done
if [ -z "$a" ]; then
echo "Failed: Unable to locate bluetooth device"
exit 1
fi
HCD=""
EXTRA=""
if [ "$a" = "0x4329" ] ; then
HCD="bcm4329.hcd"
fi
if [ "$a" = "0x4329" ] ; then
HCD="bcm4329.hcd"
fi
if [ "$a" = "0x4330" ] ; then
HCD="bcm4330.hcd"
EXTRA="--no2bytes --enable_lpm --tosleep=50000 "
if [ "$a" = "0x4330" ] ; then
HCD="bcm4330.hcd"
fi
fi
# UART TTY can be different for each board
@ -54,6 +52,10 @@ if [ -z "$TTY" ]; then
done
fi
if [ "$HCD" = "bcm4330.hcd" ]; then
EXTRA="--no2bytes --enable_lpm --tosleep=50000 "
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 ${TTY} --enable_hci $EXTRA $MAC_OPTIONS &