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 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 36 | SRCREV = "99d5c588e95ec9c9b86d7e88d3cf85b4f729d2bc" |
| 37 | PV = "20210315-3+rpt4" |
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/ |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 61 | rm ${D}${nonarch_base_libdir}/firmware/cypress/README.txt |
Andrew Geissler | 5c4154f | 2020-10-16 10:13:56 -0500 | [diff] [blame] | 62 | # add compat links. Fixes errors like |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 63 | # 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] | 64 | ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt |
Andrew Geissler | d583833 | 2022-05-27 11:33:10 -0500 | [diff] [blame^] | 65 | # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin failed with error -2 |
| 66 | ln -s brcmfmac43455-sdio.bin ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | PACKAGES = "\ |
| 70 | ${PN}-broadcom-license \ |
| 71 | ${PN}-bcm43430 \ |
| 72 | ${PN}-bcm43455 \ |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 73 | ${PN}-bcm43456 \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 74 | ${PN}-bcm43436 \ |
| 75 | ${PN}-bcm43436s \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 76 | " |
| 77 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 78 | LICENSE:${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 79 | LICENSE:${PN}-bcm43436 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 80 | LICENSE:${PN}-bcm43436s = "Firmware-broadcom_bcm43xx-rpidistro" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 81 | LICENSE:${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 82 | LICENSE:${PN}-bcm43456 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 83 | LICENSE:${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 84 | FILES:${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENSE.broadcom_bcm43xx-rpidistro" |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 85 | FILES:${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430* ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.bin ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.clm_blob" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 86 | FILES:${PN}-bcm43436 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436-*" |
| 87 | FILES:${PN}-bcm43436s = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436s*" |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 88 | 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] | 89 | FILES:${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*" |
| 90 | RDEPENDS:${PN}-bcm43430 += "${PN}-broadcom-license" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 91 | RDEPENDS:${PN}-bcm43436 += "${PN}-broadcom-license" |
| 92 | RDEPENDS:${PN}-bcm43436s += "${PN}-broadcom-license" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 93 | RDEPENDS:${PN}-bcm43455 += "${PN}-broadcom-license" |
| 94 | RDEPENDS:${PN}-bcm43456 += "${PN}-broadcom-license" |
| 95 | RCONFLICTS:${PN}-bcm43430 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 96 | linux-firmware-bcm43430 \ |
| 97 | linux-firmware-raspbian-bcm43430 \ |
| 98 | " |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 99 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 100 | RREPLACES:${PN}-bcm43430 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 101 | linux-firmware-bcm43430 \ |
| 102 | linux-firmware-raspbian-bcm43430 \ |
| 103 | " |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 104 | |
| 105 | RCONFLICTS:${PN}-bcm43436 = "\ |
| 106 | linux-firmware-bcm43436 \ |
| 107 | linux-firmware-raspbian-bcm43436 \ |
| 108 | " |
| 109 | |
| 110 | RREPLACES:${PN}-bcm43436 = "\ |
| 111 | linux-firmware-bcm43436 \ |
| 112 | linux-firmware-raspbian-bcm43436 \ |
| 113 | " |
| 114 | |
| 115 | RCONFLICTS:${PN}-bcm43436s = "\ |
| 116 | linux-firmware-bcm43436s \ |
| 117 | linux-firmware-raspbian-bcm43436s \ |
| 118 | " |
| 119 | |
| 120 | RREPLACES:${PN}-bcm43436s = "\ |
| 121 | linux-firmware-bcm43436s \ |
| 122 | linux-firmware-raspbian-bcm43436s \ |
| 123 | " |
| 124 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 125 | RCONFLICTS:${PN}-bcm43455 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 126 | linux-firmware-bcm43455 \ |
| 127 | linux-firmware-raspbian-bcm43455 \ |
| 128 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 129 | RREPLACES:${PN}-bcm43455 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 130 | linux-firmware-bcm43455 \ |
| 131 | linux-firmware-raspbian-bcm43455 \ |
| 132 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 133 | RCONFLICTS:${PN}-bcm43456 = "\ |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 134 | linux-firmware-bcm43456 \ |
| 135 | linux-firmware-raspbian-bcm43456 \ |
| 136 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 137 | RREPLACES:${PN}-bcm43456 = "\ |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 138 | linux-firmware-bcm43456 \ |
| 139 | linux-firmware-raspbian-bcm43456 \ |
| 140 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 141 | |
| 142 | # Firmware files are generally not run on the CPU, so they can be |
| 143 | # allarch despite being architecture specific |
| 144 | INSANE_SKIP = "arch" |