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 |
| 11 | # |
| 12 | # It is likely[^1] that both of these should be under LICENCE.cypress. |
| 13 | # Further, at this time the text of LICENCE.broadcom_bcm43xx is the same |
| 14 | # in linux-firmware and RPi-Distro/firmware-nonfree, but this may |
| 15 | # change. |
| 16 | # |
| 17 | # Rather than make assumptions about what's supposed to be what, we'll |
| 18 | # use the license implied by the source of these files, named to avoid |
| 19 | # conflicts with linux-firmware. |
| 20 | # |
| 21 | # [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1 |
| 22 | LICENSE = "\ |
| 23 | Firmware-broadcom_bcm43xx-rpidistro \ |
| 24 | & WHENCE \ |
| 25 | " |
| 26 | LIC_FILES_CHKSUM = "\ |
| 27 | file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \ |
Brad Bishop | f76da50 | 2019-10-10 08:51:21 -0400 | [diff] [blame] | 28 | file://WHENCE;md5=7b12b2224438186e4c97c4c7f3a5cc28 \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | " |
| 30 | |
| 31 | # These are not common licenses, set NO_GENERIC_LICENSE for them |
| 32 | # so that the license files will be copied from fetched source |
| 33 | NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "LICENCE.broadcom_bcm43xx" |
| 34 | NO_GENERIC_LICENSE[WHENCE] = "WHENCE" |
| 35 | |
Brad Bishop | f76da50 | 2019-10-10 08:51:21 -0400 | [diff] [blame] | 36 | SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree" |
| 37 | |
Andrew Geissler | 5c4154f | 2020-10-16 10:13:56 -0500 | [diff] [blame] | 38 | SRCREV = "98e815735e2c805d65994ccc608f399595b74438" |
| 39 | PV = "20190114-1+rpt8" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 40 | |
| 41 | S = "${WORKDIR}/git" |
| 42 | |
| 43 | inherit allarch |
| 44 | |
| 45 | CLEANBROKEN = "1" |
| 46 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 47 | do_compile() { |
| 48 | : |
| 49 | } |
| 50 | |
| 51 | do_install() { |
| 52 | install -d ${D}${nonarch_base_libdir}/firmware/brcm |
| 53 | |
| 54 | cp ./LICENCE.broadcom_bcm43xx ${D}${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro |
| 55 | |
| 56 | # Replace outdated linux-firmware files with updated ones from |
| 57 | # raspbian firmware-nonfree. Raspbian adds blobs and nvram |
| 58 | # definitions that are also necessary so copy those too. |
| 59 | for fw in brcmfmac43430-sdio brcmfmac43455-sdio ; do |
| 60 | install -m 0644 brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/ |
| 61 | done |
Andrew Geissler | 5c4154f | 2020-10-16 10:13:56 -0500 | [diff] [blame] | 62 | # add compat links. Fixes errors like |
| 63 | # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2 |
| 64 | ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt |
| 65 | ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt |
| 66 | ln -s brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt |
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 \ |
| 73 | " |
| 74 | |
| 75 | LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 76 | LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 77 | LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro" |
| 78 | FILES_${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro" |
| 79 | FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430*" |
| 80 | FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455*" |
| 81 | RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license" |
| 82 | RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license" |
| 83 | RCONFLICTS_${PN}-bcm43430 = "\ |
| 84 | linux-firmware-bcm43430 \ |
| 85 | linux-firmware-raspbian-bcm43430 \ |
| 86 | " |
| 87 | RREPLACES_${PN}-bcm43430 = "\ |
| 88 | linux-firmware-bcm43430 \ |
| 89 | linux-firmware-raspbian-bcm43430 \ |
| 90 | " |
| 91 | RCONFLICTS_${PN}-bcm43455 = "\ |
| 92 | linux-firmware-bcm43455 \ |
| 93 | linux-firmware-raspbian-bcm43455 \ |
| 94 | " |
| 95 | RREPLACES_${PN}-bcm43455 = "\ |
| 96 | linux-firmware-bcm43455 \ |
| 97 | linux-firmware-raspbian-bcm43455 \ |
| 98 | " |
| 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" |