Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "Linux kernel Bluetooth firmware files from Raspbian distribution" |
| 2 | DESCRIPTION = "Updated Bluetooth firmware files for RaspberryPi hardware. \ |
| 3 | RPi-Distro obtains these directly from Cypress; they are not submitted \ |
| 4 | to linux-firmware for general use." |
| 5 | HOMEPAGE = "https://github.com/RPi-Distro/bluez-firmware" |
| 6 | SECTION = "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 |
| 17 | LICENSE = "Firmware-cypress-rpidistro" |
| 18 | LIC_FILES_CHKSUM = "\ |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 19 | file://LICENCE.cypress-rpidistro;md5=c5d12ae0b24ef7177902a8e288751a4e \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 20 | " |
| 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 |
| 24 | NO_GENERIC_LICENSE[Firmware-cypress-rpidistro] = "LICENCE.cypress-rpidistro" |
| 25 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 26 | SRC_URI = " \ |
| 27 | git://github.com/RPi-Distro/bluez-firmware;branch=master;protocol=https \ |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 28 | " |
Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 29 | SRCREV = "9556b08ace2a1735127894642cc8ea6529c04c90" |
| 30 | PV = "1.2-4+rpt10" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | |
| 32 | S = "${WORKDIR}/git" |
| 33 | |
| 34 | inherit allarch |
| 35 | |
| 36 | CLEANBROKEN = "1" |
| 37 | |
| 38 | do_extract_lic() { |
| 39 | # Extract the license from the Debian copyright file |
| 40 | sed -e '1,23d' ${S}/debian/copyright > ${S}/LICENCE.cypress-rpidistro |
| 41 | } |
| 42 | # Must be before both do_install and do_populate_lic. Putting it before |
| 43 | # their common ancestor works; other approaches do not. |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 44 | addtask extract_lic after do_unpack before do_patch do_create_spdx |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 45 | |
| 46 | do_compile() { |
| 47 | : |
| 48 | } |
| 49 | |
| 50 | do_install() { |
| 51 | install -d ${D}${nonarch_base_libdir}/firmware/brcm |
| 52 | |
| 53 | cp LICENCE.cypress-rpidistro ${D}${nonarch_base_libdir}/firmware |
| 54 | install -m 0644 broadcom/BCM434*.hcd ${D}${nonarch_base_libdir}/firmware/brcm/ |
| 55 | } |
| 56 | |
| 57 | PACKAGES = "\ |
| 58 | ${PN}-cypress-license \ |
| 59 | ${PN}-bcm43430a1-hcd \ |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 60 | ${PN}-bcm43430b0-hcd \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 61 | ${PN}-bcm4345c0-hcd \ |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 62 | ${PN}-bcm4345c5-hcd \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 63 | " |
| 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | LICENSE:${PN}-bcm43430a1-hcd = "Firmware-cypress-rpidistro" |
| 66 | LICENSE:${PN}-bcm43430b0-hcd = "Firmware-cypress-rpidistro" |
| 67 | LICENSE:${PN}-bcm4345c0-hcd = "Firmware-cypress-rpidistro" |
| 68 | LICENSE:${PN}-bcm4345c5-hcd = "Firmware-cypress-rpidistro" |
| 69 | LICENSE:${PN}-cypress-license = "Firmware-cypress-rpidistro" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 70 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 71 | FILES:${PN}-cypress-license = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 72 | ${nonarch_base_libdir}/firmware/LICENCE.cypress-rpidistro \ |
| 73 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 74 | FILES:${PN}-bcm43430a1-hcd = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 75 | ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \ |
| 76 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 77 | FILES:${PN}-bcm43430b0-hcd = "\ |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 78 | ${nonarch_base_libdir}/firmware/brcm/BCM43430B0.hcd \ |
| 79 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 80 | FILES:${PN}-bcm4345c0-hcd = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 81 | ${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \ |
| 82 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 83 | FILES:${PN}-bcm4345c5-hcd = "\ |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 84 | ${nonarch_base_libdir}/firmware/brcm/BCM4345C5.hcd \ |
| 85 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 86 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 87 | RDEPENDS:${PN}-bcm43430a1-hcd += "${PN}-cypress-license" |
| 88 | RDEPENDS:${PN}-bcm43430b0-hcd += "${PN}-cypress-license" |
| 89 | RDEPENDS:${PN}-bcm4345c0-hcd += "${PN}-cypress-license" |
| 90 | RDEPENDS:${PN}-bcm4345c5-hcd += "${PN}-cypress-license" |
| 91 | RCONFLICTS:${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" |
| 92 | RREPLACES:${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" |
| 93 | RCONFLICTS:${PN}-bcm43430b0-hcd = "linux-firmware-bcm43430b0-hcd" |
| 94 | RREPLACES:${PN}-bcm43430b0-hcd = "linux-firmware-bcm43430b0-hcd" |
| 95 | RCONFLICTS:${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" |
| 96 | RREPLACES:${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" |
| 97 | RCONFLICTS:${PN}-bcm43435c5-hcd = "linux-firmware-bcm4345c5-hcd" |
| 98 | RREPLACES:${PN}-bcm43435c5-hcd = "linux-firmware-bcm4345c5-hcd" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 99 | |
| 100 | # Firmware files are generally not run on the CPU, so they can be |
| 101 | # allarch despite being architecture specific |
| 102 | INSANE_SKIP = "arch" |