blob: c0180eb087a3bea65a0d2099a3cd11620bc32997 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "Linux kernel Bluetooth firmware files from Raspbian distribution"
2DESCRIPTION = "Updated Bluetooth firmware files for RaspberryPi hardware. \
3RPi-Distro obtains these directly from Cypress; they are not submitted \
4to linux-firmware for general use."
5HOMEPAGE = "https://github.com/RPi-Distro/bluez-firmware"
6SECTION = "kernel"
7
8# Upstream has provided[^1] licensing information in the Debian
9# copyright file. The wording of the Cypress license subsequently
10# changed in linux-firmware.
11#
12# Rather than make assumptions about what's supposed to be what, we'll
13# use the license implied by the source of these files, named to avoid
14# conflicts with linux-firmware.
15#
16# [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1
17LICENSE = "Firmware-cypress-rpidistro"
18LIC_FILES_CHKSUM = "\
William A. Kennington IIIa99e9b62021-06-02 12:47:56 -070019 file://LICENCE.cypress-rpidistro;md5=c5d12ae0b24ef7177902a8e288751a4e \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020"
21
22# These are not common licenses, set NO_GENERIC_LICENSE for them
23# so that the license files will be copied from fetched source
24NO_GENERIC_LICENSE[Firmware-cypress-rpidistro] = "LICENCE.cypress-rpidistro"
25
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050026SRC_URI = " \
27 git://github.com/RPi-Distro/bluez-firmware;branch=master;protocol=https \
28 file://31ad68831357d2019624004f1f0846475671088f.patch \
29"
William A. Kennington IIIa99e9b62021-06-02 12:47:56 -070030SRCREV = "e7fd166981ab4bb9a36c2d1500205a078a35714d"
31PV = "1.2-4+rpt8"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032
33S = "${WORKDIR}/git"
34
35inherit allarch
36
37CLEANBROKEN = "1"
38
39do_extract_lic() {
40 # Extract the license from the Debian copyright file
41 sed -e '1,23d' ${S}/debian/copyright > ${S}/LICENCE.cypress-rpidistro
42}
43# Must be before both do_install and do_populate_lic. Putting it before
44# their common ancestor works; other approaches do not.
Patrick Williams03907ee2022-05-01 06:28:52 -050045addtask extract_lic after do_unpack before do_patch do_create_spdx
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080046
47do_compile() {
48 :
49}
50
51do_install() {
52 install -d ${D}${nonarch_base_libdir}/firmware/brcm
53
54 cp LICENCE.cypress-rpidistro ${D}${nonarch_base_libdir}/firmware
55 install -m 0644 broadcom/BCM434*.hcd ${D}${nonarch_base_libdir}/firmware/brcm/
56}
57
58PACKAGES = "\
59 ${PN}-cypress-license \
60 ${PN}-bcm43430a1-hcd \
William A. Kennington IIIa99e9b62021-06-02 12:47:56 -070061 ${PN}-bcm43430b0-hcd \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080062 ${PN}-bcm4345c0-hcd \
William A. Kennington IIIa99e9b62021-06-02 12:47:56 -070063 ${PN}-bcm4345c5-hcd \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080064"
65
Patrick Williams213cb262021-08-07 19:21:33 -050066LICENSE:${PN}-bcm43430a1-hcd = "Firmware-cypress-rpidistro"
67LICENSE:${PN}-bcm43430b0-hcd = "Firmware-cypress-rpidistro"
68LICENSE:${PN}-bcm4345c0-hcd = "Firmware-cypress-rpidistro"
69LICENSE:${PN}-bcm4345c5-hcd = "Firmware-cypress-rpidistro"
70LICENSE:${PN}-cypress-license = "Firmware-cypress-rpidistro"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080071
Patrick Williams213cb262021-08-07 19:21:33 -050072FILES:${PN}-cypress-license = "\
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080073 ${nonarch_base_libdir}/firmware/LICENCE.cypress-rpidistro \
74"
Patrick Williams213cb262021-08-07 19:21:33 -050075FILES:${PN}-bcm43430a1-hcd = "\
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080076 ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \
77"
Patrick Williams213cb262021-08-07 19:21:33 -050078FILES:${PN}-bcm43430b0-hcd = "\
William A. Kennington IIIa99e9b62021-06-02 12:47:56 -070079 ${nonarch_base_libdir}/firmware/brcm/BCM43430B0.hcd \
80"
Patrick Williams213cb262021-08-07 19:21:33 -050081FILES:${PN}-bcm4345c0-hcd = "\
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080082 ${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \
83"
Patrick Williams213cb262021-08-07 19:21:33 -050084FILES:${PN}-bcm4345c5-hcd = "\
William A. Kennington IIIa99e9b62021-06-02 12:47:56 -070085 ${nonarch_base_libdir}/firmware/brcm/BCM4345C5.hcd \
86"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080087
Patrick Williams213cb262021-08-07 19:21:33 -050088RDEPENDS:${PN}-bcm43430a1-hcd += "${PN}-cypress-license"
89RDEPENDS:${PN}-bcm43430b0-hcd += "${PN}-cypress-license"
90RDEPENDS:${PN}-bcm4345c0-hcd += "${PN}-cypress-license"
91RDEPENDS:${PN}-bcm4345c5-hcd += "${PN}-cypress-license"
92RCONFLICTS:${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd"
93RREPLACES:${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd"
94RCONFLICTS:${PN}-bcm43430b0-hcd = "linux-firmware-bcm43430b0-hcd"
95RREPLACES:${PN}-bcm43430b0-hcd = "linux-firmware-bcm43430b0-hcd"
96RCONFLICTS:${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd"
97RREPLACES:${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd"
98RCONFLICTS:${PN}-bcm43435c5-hcd = "linux-firmware-bcm4345c5-hcd"
99RREPLACES:${PN}-bcm43435c5-hcd = "linux-firmware-bcm4345c5-hcd"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800100
101# Firmware files are generally not run on the CPU, so they can be
102# allarch despite being architecture specific
103INSANE_SKIP = "arch"