blob: 8c474ecdc47259c092962edee9ef25fea84b42fa [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001# Copyright (C) 2018 Krzysztof Kozlowski <krzk@kernel.org>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMMARY = "Broadcom Bluetooth firmware files"
5DESCRIPTION = "Firmware for Broadcom Bluetooth devices. Note that in case of BT+WiFi devices, separate WiFi firmware might be needed."
6HOMEPAGE = "https://github.com/winterheart/broadcom-bt-firmware"
7
8LICENSE = "Firmware-Broadcom-WIDCOMM"
9NO_GENERIC_LICENSE[Firmware-Broadcom-WIDCOMM] = "LICENSE.broadcom_bcm20702"
10
11LIC_FILES_CHKSUM = "file://LICENSE.broadcom_bcm20702;md5=c0d5ea0502b00df74173d0f8a48b619d"
12SRC_URI = "git://github.com/winterheart/broadcom-bt-firmware.git"
13SRCREV = "c0bd928b8ae5754b6077c99afe6ef5c949a58f32"
14PE = "1"
15PV = "0.0+git${SRCPV}"
16
17S = "${WORKDIR}/git"
18
19inherit allarch
20
21CLEANBROKEN = "1"
22
23do_compile() {
24 :
25}
26
27do_install() {
28 install -d ${D}${nonarch_base_libdir}/firmware/brcm/
29 cp brcm/*.hcd ${D}${nonarch_base_libdir}/firmware/brcm/
30
31 # For license package:
32 install -m 0644 LICENSE.broadcom_bcm20702 ${D}${nonarch_base_libdir}/firmware/brcm/
33
34 # For main package:
35 install -m 0644 DEVICES.md ${D}${nonarch_base_libdir}/firmware/brcm/
36}
37
38PACKAGES =+ " \
39 ${PN}-bcm20702a1 \
40 ${PN}-bcm20702b0 \
41 ${PN}-bcm20703a1 \
42 ${PN}-bcm43142a0 \
43 ${PN}-bcm4335c0 \
44 ${PN}-bcm4350c5 \
45 ${PN}-bcm4356a2 \
46 ${PN}-bcm4371c2 \
47 ${PN}-license \
48"
49
50RDEPENDS_${PN}-bcm20702a1 = "${PN}-license"
51RDEPENDS_${PN}-bcm20702b0 = "${PN}-license"
52RDEPENDS_${PN}-bcm20703a1 = "${PN}-license"
53RDEPENDS_${PN}-bcm43142a0 = "${PN}-license"
54RDEPENDS_${PN}-bcm4335c0 = "${PN}-license"
55RDEPENDS_${PN}-bcm4350c5 = "${PN}-license"
56RDEPENDS_${PN}-bcm4356a2 = "${PN}-license"
57RDEPENDS_${PN}-bcm4371c2 = "${PN}-license"
58
59FILES_${PN}-bcm20702a1 = "${nonarch_base_libdir}/firmware/brcm/BCM20702A1*hcd"
60FILES_${PN}-bcm20702b0 = "${nonarch_base_libdir}/firmware/brcm/BCM20702B0*hcd"
61FILES_${PN}-bcm20703a1 = "${nonarch_base_libdir}/firmware/brcm/BCM20703A1*hcd"
62FILES_${PN}-bcm43142a0 = "${nonarch_base_libdir}/firmware/brcm/BCM43142A0*hcd"
63FILES_${PN}-bcm4335c0 = "${nonarch_base_libdir}/firmware/brcm/BCM4335C0*hcd"
64FILES_${PN}-bcm4350c5 = "${nonarch_base_libdir}/firmware/brcm/BCM4350C5*hcd"
65FILES_${PN}-bcm4356a2 = "${nonarch_base_libdir}/firmware/brcm/BCM4356A2*hcd"
66FILES_${PN}-bcm4371c2 = "${nonarch_base_libdir}/firmware/brcm/BCM4371C2*hcd"
67FILES_${PN}-license += "${nonarch_base_libdir}/firmware/brcm/LICENSE.broadcom_bcm20702"
68
69FILES_${PN} += "${nonarch_base_libdir}/firmware/brcm/*"
70RDEPENDS_${PN} += "${PN}-license"
71
72# Make broadcom-bt-firmware depend on all of the split-out packages.
73python populate_packages_prepend () {
74 firmware_pkgs = oe.utils.packages_filter_out_system(d)
75 d.appendVar('RDEPENDS_broadcom-bt-firmware', ' ' + ' '.join(firmware_pkgs))
76}