Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | SUMMARY = "Linux kernel firmware files from Raspbian distribution" |
| 2 | DESCRIPTION = "Updated 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/firmware-nonfree" |
| 6 | SECTION = "kernel" |
| 7 | |
| 8 | # In maintained upstream linux-firmware: |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 9 | # * brcmfmac43430-sdio falls under LICENSE.cypress |
| 10 | # * brcmfmac43455-sdio falls under LICENSE.broadcom_bcm43xx |
| 11 | # * brcmfmac43456-sdio falls under LICENSE.broadcom_bcm43xx |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | # |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 13 | # It is likely[^1] that both of these should be under LICENSE.cypress. |
| 14 | # Further, at this time the text of LICENSE.broadcom_bcm43xx is the same |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 15 | # in linux-firmware and RPi-Distro/firmware-nonfree, but this may |
| 16 | # change. |
| 17 | # |
| 18 | # Rather than make assumptions about what's supposed to be what, we'll |
| 19 | # use the license implied by the source of these files, named to avoid |
| 20 | # conflicts with linux-firmware. |
| 21 | # |
| 22 | # [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1 |
| 23 | LICENSE = "\ |
| 24 | Firmware-broadcom_bcm43xx-rpidistro \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 25 | " |
| 26 | LIC_FILES_CHKSUM = "\ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 27 | file://debian/config/brcm80211/LICENSE;md5=8cba1397cda6386db37210439a0da3eb \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 28 | " |
| 29 | |
| 30 | # These are not common licenses, set NO_GENERIC_LICENSE for them |
| 31 | # so that the license files will be copied from fetched source |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 32 | NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "debian/config/brcm80211/LICENSE" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 33 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 34 | SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree;branch=bullseye;protocol=https" |
Brad Bishop | f76da50 | 2019-10-10 08:51:21 -0400 | [diff] [blame] | 35 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 36 | SRCREV = "b3eec612566ca08913f0830d299f4df70297428f" |
| 37 | PV = "20210315-3+rpt3" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 38 | |
| 39 | S = "${WORKDIR}/git" |
| 40 | |
| 41 | inherit allarch |
| 42 | |
| 43 | CLEANBROKEN = "1" |
| 44 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 45 | do_compile() { |
| 46 | : |
| 47 | } |
| 48 | |
| 49 | do_install() { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 50 | install -d ${D}${nonarch_base_libdir}/firmware/brcm ${D}${nonarch_base_libdir}/firmware/cypress |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 51 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 52 | cp debian/config/brcm80211/LICENSE ${D}${nonarch_base_libdir}/firmware/LICENSE.broadcom_bcm43xx-rpidistro |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 53 | |
| 54 | # Replace outdated linux-firmware files with updated ones from |
| 55 | # raspbian firmware-nonfree. Raspbian adds blobs and nvram |
| 56 | # definitions that are also necessary so copy those too. |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 57 | for fw in brcmfmac43430-sdio brcmfmac43436-sdio brcmfmac43436s-sdio brcmfmac43455-sdio brcmfmac43456-sdio ; do |
| 58 | cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 59 | done |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 60 | cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/cypress/* ${D}${nonarch_base_libdir}/firmware/cypress/ |
Andrew Geissler | 5c4154f | 2020-10-16 10:13:56 -0500 | [diff] [blame] | 61 | # add compat links. Fixes errors like |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 62 | # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-compute-module.txt failed with error -2 |
Patrick Williams | 0ca19cc | 2021-08-16 14:03:13 -0500 | [diff] [blame] | 63 | ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 64 | } |
| 65 | |
| 66 | PACKAGES = "\ |
| 67 | ${PN}-broadcom-license \ |
| 68 | ${PN}-bcm43430 \ |
| 69 | ${PN}-bcm43455 \ |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 70 | ${PN}-bcm43456 \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 71 | ${PN}-bcm43436 \ |
| 72 | ${PN}-bcm43436s \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 73 | " |
| 74 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 75 | LICENSE:${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 76 | LICENSE:${PN}-bcm43436 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 77 | LICENSE:${PN}-bcm43436s = "Firmware-broadcom_bcm43xx-rpidistro" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 78 | LICENSE:${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 79 | LICENSE:${PN}-bcm43456 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 80 | LICENSE:${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 81 | FILES:${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENSE.broadcom_bcm43xx-rpidistro" |
| 82 | FILES:${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430* ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.bin" |
| 83 | FILES:${PN}-bcm43436 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436-*" |
| 84 | FILES:${PN}-bcm43436s = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436s*" |
| 85 | FILES:${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455* ${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio.*" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 86 | FILES:${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*" |
| 87 | RDEPENDS:${PN}-bcm43430 += "${PN}-broadcom-license" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 88 | RDEPENDS:${PN}-bcm43436 += "${PN}-broadcom-license" |
| 89 | RDEPENDS:${PN}-bcm43436s += "${PN}-broadcom-license" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 90 | RDEPENDS:${PN}-bcm43455 += "${PN}-broadcom-license" |
| 91 | RDEPENDS:${PN}-bcm43456 += "${PN}-broadcom-license" |
| 92 | RCONFLICTS:${PN}-bcm43430 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 93 | linux-firmware-bcm43430 \ |
| 94 | linux-firmware-raspbian-bcm43430 \ |
| 95 | " |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 96 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 97 | RREPLACES:${PN}-bcm43430 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 98 | linux-firmware-bcm43430 \ |
| 99 | linux-firmware-raspbian-bcm43430 \ |
| 100 | " |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 101 | |
| 102 | RCONFLICTS:${PN}-bcm43436 = "\ |
| 103 | linux-firmware-bcm43436 \ |
| 104 | linux-firmware-raspbian-bcm43436 \ |
| 105 | " |
| 106 | |
| 107 | RREPLACES:${PN}-bcm43436 = "\ |
| 108 | linux-firmware-bcm43436 \ |
| 109 | linux-firmware-raspbian-bcm43436 \ |
| 110 | " |
| 111 | |
| 112 | RCONFLICTS:${PN}-bcm43436s = "\ |
| 113 | linux-firmware-bcm43436s \ |
| 114 | linux-firmware-raspbian-bcm43436s \ |
| 115 | " |
| 116 | |
| 117 | RREPLACES:${PN}-bcm43436s = "\ |
| 118 | linux-firmware-bcm43436s \ |
| 119 | linux-firmware-raspbian-bcm43436s \ |
| 120 | " |
| 121 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 122 | RCONFLICTS:${PN}-bcm43455 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 123 | linux-firmware-bcm43455 \ |
| 124 | linux-firmware-raspbian-bcm43455 \ |
| 125 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 126 | RREPLACES:${PN}-bcm43455 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 127 | linux-firmware-bcm43455 \ |
| 128 | linux-firmware-raspbian-bcm43455 \ |
| 129 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 130 | RCONFLICTS:${PN}-bcm43456 = "\ |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 131 | linux-firmware-bcm43456 \ |
| 132 | linux-firmware-raspbian-bcm43456 \ |
| 133 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 134 | RREPLACES:${PN}-bcm43456 = "\ |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 135 | linux-firmware-bcm43456 \ |
| 136 | linux-firmware-raspbian-bcm43456 \ |
| 137 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 138 | |
| 139 | # Firmware files are generally not run on the CPU, so they can be |
| 140 | # allarch despite being architecture specific |
| 141 | INSANE_SKIP = "arch" |