blob: d1b84df4345ad7a07672b09946d34bdf53bdfebb [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://0001-bcm43xx-Add-bcm43xx-3wire-variant.patch \
5 file://0002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch \
6 file://0003-Increase-firmware-load-timeout-to-30s.patch \
7 file://0004-Move-the-43xx-firmware-into-lib-firmware.patch \
8 file://brcm43438.service \
9 "
10
Brad Bishop316dfdd2018-06-25 12:45:53 -040011BCM_BT_SERVICE = "brcm43438.service"
Patrick Williams8b8bc412016-08-17 15:02:23 -050012
Brad Bishop316dfdd2018-06-25 12:45:53 -040013enable_bcm_bluetooth() {
Patrick Williams8b8bc412016-08-17 15:02:23 -050014 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
15 install -d ${D}${systemd_unitdir}/system
Brad Bishop316dfdd2018-06-25 12:45:53 -040016 install -m 0644 ${WORKDIR}/${BCM_BT_SERVICE} ${D}${systemd_unitdir}/system
Patrick Williams8b8bc412016-08-17 15:02:23 -050017 fi
18}
19
Brad Bishop316dfdd2018-06-25 12:45:53 -040020BCM_BT_RDEPENDS = "\
21 udev-rules-rpi \
22 pi-bluetooth \
23"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050024
25# for raspberrypi3
26SRC_URI_append_raspberrypi3 = " ${BCM_BT_SOURCES}"
27
28do_install_append_raspberrypi3() {
29 enable_bcm_bluetooth
30}
31
Brad Bishopd7bf8c12018-02-25 22:55:05 -050032SYSTEMD_SERVICE_${PN}_append_raspberrypi3 = " ${BCM_BT_SERVICE}"
33
Brad Bishop316dfdd2018-06-25 12:45:53 -040034RDEPENDS_${PN}_append_raspberrypi3 = " ${BCM_BT_RDEPENDS}"
35
Brad Bishopd7bf8c12018-02-25 22:55:05 -050036# for raspberrypi0-wifi
37SRC_URI_append_raspberrypi0-wifi = " ${BCM_BT_SOURCES}"
38
39do_install_append_raspberrypi0-wifi() {
40 enable_bcm_bluetooth
41}
42
Brad Bishopd7bf8c12018-02-25 22:55:05 -050043SYSTEMD_SERVICE_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_SERVICE}"
Brad Bishop316dfdd2018-06-25 12:45:53 -040044
45RDEPENDS_${PN}_append_raspberrypi0-wifi = " ${BCM_BT_RDEPENDS}"