blob: 03efd5c00fa2c906695f2ad1436bbbc383d4db73 [file] [log] [blame]
Patrick Williams8b8bc412016-08-17 15:02:23 -05001FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
Brad Bishopd7bf8c12018-02-25 22:55:05 -05003BCM_BT_SOURCES = " \
Patrick Williams8b8bc412016-08-17 15:02:23 -05004 file://BCM43430A1.hcd \
5 file://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
6 file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \
7 file://0003-Increase-firmware-load-timeout-to-30s.patch \
8 file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \
9 file://brcm43438.service \
10 "
11
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012enable_bcm_bluetooth() {
Patrick Williams8b8bc412016-08-17 15:02:23 -050013 install -d ${D}/lib/firmware/brcm/
14 install -m 0644 ${WORKDIR}/BCM43430A1.hcd ${D}/lib/firmware/brcm/BCM43430A1.hcd
15
16 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
17 install -d ${D}${systemd_unitdir}/system
18 install -m 0644 ${WORKDIR}/brcm43438.service ${D}${systemd_unitdir}/system
19 fi
20}
21
Brad Bishopd7bf8c12018-02-25 22:55:05 -050022BCM_BT_FIRMWARE = " \
Patrick Williams8b8bc412016-08-17 15:02:23 -050023 /lib/firmware/brcm/BCM43430A1.hcd \
24 "
25
Brad Bishopd7bf8c12018-02-25 22:55:05 -050026BCM_BT_SERVICE = " brcm43438.service"
27
28# for raspberrypi3
29SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}"
30
31do_install_append_raspberrypi3() {
32 enable_bcm_bluetooth
33}
34
35FILES_${PN}_append_raspberrypi3 = " ${BCM_BT_FIRMWARE}"
36
37SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " ${BCM_BT_SERVICE}"
38
39# for raspberrypi0-wifi
40SRC_URI_append_raspberrypi0-wifi = " ${BCM_BT_SOURCES}"
41
42do_install_append_raspberrypi0-wifi() {
43 enable_bcm_bluetooth
44}
45
46FILES_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_FIRMWARE}"
47
48SYSTEMD_SERVICE_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_SERVICE}"