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 \ |
| 28 | file://WHENCE;md5=a9c2c217f513c20e1d16b384b3e2c12d \ |
| 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 | |
| 36 | SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree" |
| 37 | SRCREV = "b518de45ced519e8f7a499f4778100173402ae43" |
| 38 | PV = "0.0+git${SRCPV}" |
| 39 | |
| 40 | S = "${WORKDIR}/git" |
| 41 | |
| 42 | inherit allarch |
| 43 | |
| 44 | CLEANBROKEN = "1" |
| 45 | |
| 46 | do_compile() { |
| 47 | : |
| 48 | } |
| 49 | |
| 50 | do_install() { |
| 51 | install -d ${D}${nonarch_base_libdir}/firmware/brcm |
| 52 | |
| 53 | cp ./LICENCE.broadcom_bcm43xx ${D}${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro |
| 54 | |
| 55 | # Replace outdated linux-firmware files with updated ones from |
| 56 | # raspbian firmware-nonfree. Raspbian adds blobs and nvram |
| 57 | # definitions that are also necessary so copy those too. |
| 58 | for fw in brcmfmac43430-sdio brcmfmac43455-sdio ; do |
| 59 | install -m 0644 brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/ |
| 60 | done |
| 61 | } |
| 62 | |
| 63 | PACKAGES = "\ |
| 64 | ${PN}-broadcom-license \ |
| 65 | ${PN}-bcm43430 \ |
| 66 | ${PN}-bcm43455 \ |
| 67 | " |
| 68 | |
| 69 | LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 70 | LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro" |
| 71 | LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro" |
| 72 | FILES_${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro" |
| 73 | FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430*" |
| 74 | FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455*" |
| 75 | RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license" |
| 76 | RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license" |
| 77 | RCONFLICTS_${PN}-bcm43430 = "\ |
| 78 | linux-firmware-bcm43430 \ |
| 79 | linux-firmware-raspbian-bcm43430 \ |
| 80 | " |
| 81 | RREPLACES_${PN}-bcm43430 = "\ |
| 82 | linux-firmware-bcm43430 \ |
| 83 | linux-firmware-raspbian-bcm43430 \ |
| 84 | " |
| 85 | RCONFLICTS_${PN}-bcm43455 = "\ |
| 86 | linux-firmware-bcm43455 \ |
| 87 | linux-firmware-raspbian-bcm43455 \ |
| 88 | " |
| 89 | RREPLACES_${PN}-bcm43455 = "\ |
| 90 | linux-firmware-bcm43455 \ |
| 91 | linux-firmware-raspbian-bcm43455 \ |
| 92 | " |
| 93 | |
| 94 | # Firmware files are generally not run on the CPU, so they can be |
| 95 | # allarch despite being architecture specific |
| 96 | INSANE_SKIP = "arch" |