From 73ad3670c8f882bf99d271f23ae3c1be4325462e Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 19 Jun 2016 16:10:01 +0200 Subject: bluez: update and fix rpi3 support, add required firmware file. --- package/brcm-bluetooth/Makefile | 13 ++++++++++-- package/brcm-bluetooth/files/hci | 32 ++++++++++++++++++++++++++++++ package/brcm-bluetooth/src/BCM43430A1.hcd | Bin 0 -> 35976 bytes 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 package/brcm-bluetooth/files/hci create mode 100644 package/brcm-bluetooth/src/BCM43430A1.hcd (limited to 'package/brcm-bluetooth') 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 Binary files /dev/null and b/package/brcm-bluetooth/src/BCM43430A1.hcd differ -- cgit v1.2.3