summaryrefslogtreecommitdiff
path: root/package/brcm-bluetooth
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2016-06-19 16:10:01 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2016-06-19 16:10:16 +0200
commit73ad3670c8f882bf99d271f23ae3c1be4325462e (patch)
treea62b3e4e88bc0d95c18678cf33c6a561723b7ed9 /package/brcm-bluetooth
parent78eeeacd01094b4ba7e46b728fe1af4b2015b82e (diff)
bluez: update and fix rpi3 support, add required firmware file.
Diffstat (limited to 'package/brcm-bluetooth')
-rw-r--r--package/brcm-bluetooth/Makefile13
-rw-r--r--package/brcm-bluetooth/files/hci32
-rw-r--r--package/brcm-bluetooth/src/BCM43430A1.hcdbin0 -> 35976 bytes
3 files changed, 43 insertions, 2 deletions
diff --git a/package/brcm-bluetooth/Makefile b/package/brcm-bluetooth/Makefile
index 80ab9865b..141c310dd 100644
--- a/package/brcm-bluetooth/Makefile
+++ b/package/brcm-bluetooth/Makefile
@@ -9,6 +9,9 @@ PKG_RELEASE:= 1
PKG_DESCR:= firmware for broadcom bluetooth chips
PKG_SECTION:= sys/firmware
+PKG_CFLINE_BRCM_BLUETOOTH:= default y if ADK_TARGET_SYSTEM_RASPBERRY_PI3
+PKG_SYSTEM_DEPENDS:= raspberry-pi3 solidrun-imx6
+
NO_DISTFILES:= 1
include ${ADK_TOPDIR}/mk/package.mk
@@ -24,10 +27,16 @@ do-build:
-o ${WRKBUILD}/brcm_patchram ${WRKBUILD}/brcm_patchram.c
do-install:
- ${INSTALL_DIR} ${IDIR_BRCM_BLUETOOTH}/lib/firmware/brcm
- ${CP} ${WRKBUILD}/*.hcd ${IDIR_BRCM_BLUETOOTH}/lib/firmware/brcm
+ ${INSTALL_DIR} ${IDIR_BRCM_BLUETOOTH}/etc/init.d
+ $(INSTALL_BIN) ./files/hci $(IDIR_BRCM_BLUETOOTH)/etc/init.d/
+ ${INSTALL_DIR} ${IDIR_BRCM_BLUETOOTH}/lib/firmware
+ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI3),y)
+ ${CP} ${WRKBUILD}/BCM43430A1.hcd ${IDIR_BRCM_BLUETOOTH}/lib/firmware
+else
+ ${CP} ${WRKBUILD}/bcm*.hcd ${IDIR_BRCM_BLUETOOTH}/lib/firmware
${INSTALL_DIR} ${IDIR_BRCM_BLUETOOTH}/sbin
${INSTALL_BIN} ${WRKBUILD}/brcm_patchram \
${IDIR_BRCM_BLUETOOTH}/sbin/brcm_patchram
+endif
include ${ADK_TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/brcm-bluetooth/files/hci b/package/brcm-bluetooth/files/hci
new file mode 100644
index 000000000..8b7d231c3
--- /dev/null
+++ b/package/brcm-bluetooth/files/hci
@@ -0,0 +1,32 @@
+#!/bin/sh
+#PKG brcm-bluetooth
+#INIT 10
+
+case $1 in
+autostop) ;;
+autostart)
+ exec sh $0 start
+ ;;
+start)
+ target=$(cat /etc/.adktarget)
+ case $target in
+ raspberry-pi3)
+ hciattach /dev/ttyAMA0 bcm43xx 921600 noflow -
+ ;;
+ *)
+ echo "No supported target found"
+ ;;
+ esac
+ ;;
+stop)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ exit 1
+ ;;
+esac
+exit $?
diff --git a/package/brcm-bluetooth/src/BCM43430A1.hcd b/package/brcm-bluetooth/src/BCM43430A1.hcd
new file mode 100644
index 000000000..162275ac0
--- /dev/null
+++ b/package/brcm-bluetooth/src/BCM43430A1.hcd
Binary files differ