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: |
| 9 | # * brcmfmac43430-sdio falls under LICENCE.cypress |
| 10 | # * brcmfmac43455-sdio falls under LICENCE.broadcom_bcm43xx |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 11 | # * brcmfmac43456-sdio falls under LICENCE.broadcom_bcm43xx |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 12 | # |
| 13 | # It is likely[^1] that both of these should be under LICENCE.cypress. |
| 14 | # Further, at this time the text of LICENCE.broadcom_bcm43xx is the same |
| 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 \ |
| 25 | & WHENCE \ |
| 26 | " |
| 27 | LIC_FILES_CHKSUM = "\ |
| 28 | file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \ |
Brad Bishop | f76da50 | 2019-10-10 08:51:21 -0400 | [diff] [blame] | 29 | file://WHENCE;md5=7b12b2224438186e4c97c4c7f3a5cc28 \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 30 | " |
| 31 | |
| 32 | # These are not common licenses, set NO_GENERIC_LICENSE for them |
| 33 | # so that the license files will be copied from fetched source |
| 34 | NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "LICENCE.broadcom_bcm43xx" |
| 35 | NO_GENERIC_LICENSE[WHENCE] = "WHENCE" |
| 36 | |
Brad Bishop | f76da50 | 2019-10-10 08:51:21 -0400 | [diff] [blame] | 37 | SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree" |
| 38 | |
William A. Kennington III | a99e9b6 | 2021-06-02 12:47:56 -0700 | [diff] [blame] | 39 | SRCREV = "83938f78ca2d5a0ffe0c223bb96d72ccc7b71ca5" |
| 40 | PV = "20190114-1+rpt11" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 41 | |
| 42 | S = "${WORKDIR}/git" |
| 43 | |
| 44 | inherit allarch |
| 45 | |
| 46 | CLEANBROKEN = "1" |
| 47 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 48 | do_compile() { |
| 49 | : |
| 50 | } |
| 51 | |
| 52 | do_install() { |
| 53 | install -d ${D}${nonarch_base_libdir}/firmware/brcm |
| 54 | |
| 55 | cp ./LICENCE.broadcom_bcm43xx ${D}${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro |
| 56 | |
| 57 | # Replace outdated linux-firmware files with updated ones from |
| 58 | # raspbian firmware-nonfree. Raspbian adds blobs and nvram |
| 59 | # definitions that are also necessary so copy those too. |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 60 | for fw in brcmfmac43430-sdio brcmfmac43455-sdio brcmfmac43456-sdio ; do |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 61 | install -m 0644 brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/ |
| 62 | done |
Andrew Geissler | 5c4154f | 2020-10-16 10:13:56 -0500 | [diff] [blame] | 63 | # add compat links. Fixes errors like |
| 64 | # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2 |
| 65 | ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt |
| 66 | ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt |
| 67 | ln -s brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 68 | ln -s brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 69 | } |
| 70 | |
| 71 | PACKAGES = "\ |
| 72 | ${PN}-broadcom-license \ |
| 73 | ${PN}-bcm43430 \ |
| 74 | ${PN}-bcm43455 \ |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 75 | ${PN}-bcm43456 \ |
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" |
| 79 | LICENSE:${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 80 | LICENSE:${PN}-bcm43456 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 81 | LICENSE:${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro" |
| 82 | FILES:${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro" |
| 83 | FILES:${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430*" |
| 84 | FILES:${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455*" |
| 85 | FILES:${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*" |
| 86 | RDEPENDS:${PN}-bcm43430 += "${PN}-broadcom-license" |
| 87 | RDEPENDS:${PN}-bcm43455 += "${PN}-broadcom-license" |
| 88 | RDEPENDS:${PN}-bcm43456 += "${PN}-broadcom-license" |
| 89 | RCONFLICTS:${PN}-bcm43430 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 90 | linux-firmware-bcm43430 \ |
| 91 | linux-firmware-raspbian-bcm43430 \ |
| 92 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 93 | RREPLACES:${PN}-bcm43430 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 94 | linux-firmware-bcm43430 \ |
| 95 | linux-firmware-raspbian-bcm43430 \ |
| 96 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 97 | RCONFLICTS:${PN}-bcm43455 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 98 | linux-firmware-bcm43455 \ |
| 99 | linux-firmware-raspbian-bcm43455 \ |
| 100 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 101 | RREPLACES:${PN}-bcm43455 = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 102 | linux-firmware-bcm43455 \ |
| 103 | linux-firmware-raspbian-bcm43455 \ |
| 104 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 105 | RCONFLICTS:${PN}-bcm43456 = "\ |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 106 | linux-firmware-bcm43456 \ |
| 107 | linux-firmware-raspbian-bcm43456 \ |
| 108 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 109 | RREPLACES:${PN}-bcm43456 = "\ |
Andrew Geissler | 12e5ffb | 2020-12-11 16:26:08 -0600 | [diff] [blame] | 110 | linux-firmware-bcm43456 \ |
| 111 | linux-firmware-raspbian-bcm43456 \ |
| 112 | " |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 113 | |
| 114 | # Firmware files are generally not run on the CPU, so they can be |
| 115 | # allarch despite being architecture specific |
| 116 | INSANE_SKIP = "arch" |