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 | |
| 26 | SRC_URI = "git://github.com/RPi-Distro/bluez-firmware" |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 27 | SRCREV = "e7fd166981ab4bb9a36c2d1500205a078a35714d" |
| 28 | PV = "1.2-4+rpt8" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | |
| 30 | S = "${WORKDIR}/git" |
| 31 | |
| 32 | inherit allarch |
| 33 | |
| 34 | CLEANBROKEN = "1" |
| 35 | |
| 36 | do_extract_lic() { |
| 37 | # Extract the license from the Debian copyright file |
| 38 | sed -e '1,23d' ${S}/debian/copyright > ${S}/LICENCE.cypress-rpidistro |
| 39 | } |
| 40 | # Must be before both do_install and do_populate_lic. Putting it before |
| 41 | # their common ancestor works; other approaches do not. |
| 42 | addtask extract_lic after do_unpack before do_patch |
| 43 | |
| 44 | do_compile() { |
| 45 | : |
| 46 | } |
| 47 | |
| 48 | do_install() { |
| 49 | install -d ${D}${nonarch_base_libdir}/firmware/brcm |
| 50 | |
| 51 | cp LICENCE.cypress-rpidistro ${D}${nonarch_base_libdir}/firmware |
| 52 | install -m 0644 broadcom/BCM434*.hcd ${D}${nonarch_base_libdir}/firmware/brcm/ |
| 53 | } |
| 54 | |
| 55 | PACKAGES = "\ |
| 56 | ${PN}-cypress-license \ |
| 57 | ${PN}-bcm43430a1-hcd \ |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 58 | ${PN}-bcm43430b0-hcd \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 59 | ${PN}-bcm4345c0-hcd \ |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 60 | ${PN}-bcm4345c5-hcd \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 61 | " |
| 62 | |
| 63 | LICENSE_${PN}-bcm43430a1-hcd = "Firmware-cypress-rpidistro" |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 64 | LICENSE_${PN}-bcm43430b0-hcd = "Firmware-cypress-rpidistro" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 65 | LICENSE_${PN}-bcm4345c0-hcd = "Firmware-cypress-rpidistro" |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 66 | LICENSE_${PN}-bcm4345c5-hcd = "Firmware-cypress-rpidistro" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 67 | LICENSE_${PN}-cypress-license = "Firmware-cypress-rpidistro" |
| 68 | |
| 69 | FILES_${PN}-cypress-license = "\ |
| 70 | ${nonarch_base_libdir}/firmware/LICENCE.cypress-rpidistro \ |
| 71 | " |
| 72 | FILES_${PN}-bcm43430a1-hcd = "\ |
| 73 | ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \ |
| 74 | " |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 75 | FILES_${PN}-bcm43430b0-hcd = "\ |
| 76 | ${nonarch_base_libdir}/firmware/brcm/BCM43430B0.hcd \ |
| 77 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 78 | FILES_${PN}-bcm4345c0-hcd = "\ |
| 79 | ${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \ |
| 80 | " |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 81 | FILES_${PN}-bcm4345c5-hcd = "\ |
| 82 | ${nonarch_base_libdir}/firmware/brcm/BCM4345C5.hcd \ |
| 83 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 84 | |
| 85 | RDEPENDS_${PN}-bcm43430a1-hcd += "${PN}-cypress-license" |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 86 | RDEPENDS_${PN}-bcm43430b0-hcd += "${PN}-cypress-license" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 87 | RDEPENDS_${PN}-bcm4345c0-hcd += "${PN}-cypress-license" |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 88 | RDEPENDS_${PN}-bcm4345c5-hcd += "${PN}-cypress-license" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 89 | RCONFLICTS_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" |
| 90 | RREPLACES_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 91 | RCONFLICTS_${PN}-bcm43430b0-hcd = "linux-firmware-bcm43430b0-hcd" |
| 92 | RREPLACES_${PN}-bcm43430b0-hcd = "linux-firmware-bcm43430b0-hcd" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 93 | RCONFLICTS_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" |
| 94 | RREPLACES_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 95 | RCONFLICTS_${PN}-bcm43435c5-hcd = "linux-firmware-bcm4345c5-hcd" |
| 96 | RREPLACES_${PN}-bcm43435c5-hcd = "linux-firmware-bcm4345c5-hcd" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 97 | |
| 98 | # Firmware files are generally not run on the CPU, so they can be |
| 99 | # allarch despite being architecture specific |
| 100 | INSANE_SKIP = "arch" |