mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
brcmfmac_sdio-firmware-rpi: set BT MAC as new firmware uses a fixed MAC
See: https://github.com/raspberrypi/firmware/issues/860#issuecomment-324355290 Also, use sh instead of bash - one less unecessary bash dependency.
This commit is contained in:
parent
c166bcea32
commit
ee7da2fcf6
@ -1,11 +1,18 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
HCIATTACH=/usr/bin/hciattach
|
||||
SERIAL=$(awk '/^Serial/{ print $3 }' /proc/cpuinfo)
|
||||
B1=${SERIAL:10:2}
|
||||
B2=${SERIAL:12:2}
|
||||
B3=${SERIAL:14:2}
|
||||
BDADDR=$(printf b8:27:eb:%02x:%02x:%02x $((0x$B1 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B3 ^ 0xaa)))
|
||||
|
||||
if [ "$(cat /proc/device-tree/aliases/uart0)" = "$(cat /proc/device-tree/aliases/serial1)" ] ; then
|
||||
if [ "$(wc -c /proc/device-tree/soc/gpio@7e200000/uart0_pins/brcm\,pins | cut -f 1 -d ' ')" = "16" ] ; then
|
||||
/usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow -
|
||||
$HCIATTACH /dev/serial1 bcm43xx 3000000 flow - $BDADDR
|
||||
else
|
||||
/usr/bin/hciattach /dev/serial1 bcm43xx 921600 noflow -
|
||||
$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
|
||||
fi
|
||||
else
|
||||
/usr/bin/hciattach /dev/serial1 bcm43xx 460800 noflow -
|
||||
$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user