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 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 8 | LICENSE = "GPL-2.0-only & binary-redist-Cypress-rpidistro & Synaptics-rpidistro" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 9 | LIC_FILES_CHKSUM = "\ |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 10 | file://debian/config/brcm80211/copyright;md5=b0630b02d90e3da72206c909b6aecc8c \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | " |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 12 | # Where these are no common licenses, set NO_GENERIC_LICENSE so that the |
| 13 | # license files will be copied from the fetched source. |
| 14 | NO_GENERIC_LICENSE[binary-redist-Cypress-rpidistro] = "debian/config/brcm80211/copyright" |
| 15 | NO_GENERIC_LICENSE[Synaptics-rpidistro] = "debian/config/brcm80211/copyright" |
| 16 | LICENSE_FLAGS = "synaptics-killswitch" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 17 | |
Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 18 | SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree;branch=bullseye;protocol=https \ |
| 19 | file://0001-Default-43455-firmware-to-standard-variant.patch \ |
| 20 | " |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 21 | SRCREV = "541e5a05d152e7e6f0d9be45622e4a3741e51c02" |
| 22 | PV = "20210315-3+rpt7" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 23 | S = "${WORKDIR}/git" |
| 24 | |
| 25 | inherit allarch |
| 26 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 27 | do_configure[noexec] = "1" |
| 28 | do_compile[noexec] = "1" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | |
| 30 | do_install() { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 31 | 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] | 32 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 33 | cp debian/config/brcm80211/copyright ${D}${nonarch_base_libdir}/firmware/copyright.firmware-nonfree-rpidistro |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 34 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 35 | for fw in \ |
| 36 | brcmfmac43430-sdio \ |
| 37 | brcmfmac43436-sdio \ |
| 38 | brcmfmac43436s-sdio \ |
| 39 | brcmfmac43455-sdio \ |
| 40 | brcmfmac43456-sdio; do |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 41 | 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] | 42 | done |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 43 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 44 | cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/cypress/* ${D}${nonarch_base_libdir}/firmware/cypress/ |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 45 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 46 | rm ${D}${nonarch_base_libdir}/firmware/cypress/README.txt |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 47 | |
Andrew Geissler | 5c4154f | 2020-10-16 10:13:56 -0500 | [diff] [blame] | 48 | # add compat links. Fixes errors like |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 49 | # 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] | 50 | 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] | 51 | # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.bin failed with error -2 |
| 52 | 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] | 53 | } |
| 54 | |
| 55 | PACKAGES = "\ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 56 | ${PN}-bcm43430 \ |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 57 | ${PN}-bcm43436 \ |
| 58 | ${PN}-bcm43436s \ |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 59 | ${PN}-bcm43455 \ |
| 60 | ${PN}-bcm43456 \ |
| 61 | ${PN}-license \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 62 | " |
| 63 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 64 | LICENSE:${PN}-bcm43430 = "binary-redist-Cypress-rpidistro" |
| 65 | LICENSE:${PN}-bcm43436 = "Synaptics-rpidistro" |
| 66 | LICENSE:${PN}-bcm43436s = "Synaptics-rpidistro" |
| 67 | LICENSE:${PN}-bcm43455 = "binary-redist-Cypress-rpidistro" |
| 68 | LICENSE:${PN}-bcm43456 = "Synaptics-rpidistro" |
| 69 | LICENSE:${PN}-license = "GPL-2.0-only" |
| 70 | |
| 71 | FILES:${PN}-bcm43430 = " \ |
| 72 | ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430* \ |
| 73 | ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.bin \ |
| 74 | ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.clm_blob \ |
| 75 | " |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 76 | FILES:${PN}-bcm43436 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436-*" |
| 77 | FILES:${PN}-bcm43436s = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436s*" |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 78 | FILES:${PN}-bcm43455 = " \ |
| 79 | ${nonarch_base_libdir}/firmware/brcm/brcmfmac43455* \ |
| 80 | ${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio* \ |
| 81 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 82 | FILES:${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*" |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 83 | FILES:${PN}-license = "${nonarch_base_libdir}/firmware/copyright.firmware-nonfree-rpidistro" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 84 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 85 | RDEPENDS:${PN}-bcm43430 += "${PN}-license" |
| 86 | RDEPENDS:${PN}-bcm43436 += "${PN}-license" |
| 87 | RDEPENDS:${PN}-bcm43436s += "${PN}-license" |
| 88 | RDEPENDS:${PN}-bcm43455 += "${PN}-license" |
| 89 | RDEPENDS:${PN}-bcm43456 += "${PN}-license" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 90 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 91 | RCONFLICTS:${PN}-bcm43430 = "linux-firmware-raspbian-bcm43430" |
| 92 | RCONFLICTS:${PN}-bcm43436 = "linux-firmware-bcm43436" |
| 93 | RCONFLICTS:${PN}-bcm43436s = "linux-firmware-bcm43436s" |
| 94 | RCONFLICTS:${PN}-bcm43455 = "linux-firmware-bcm43455" |
| 95 | RCONFLICTS:${PN}-bcm43456 = "linux-firmware-bcm43456" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 96 | |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 97 | RREPLACES:${PN}-bcm43430 = "linux-firmware-bcm43430" |
| 98 | RREPLACES:${PN}-bcm43436 = "linux-firmware-bcm43436" |
| 99 | RREPLACES:${PN}-bcm43436s = "linux-firmware-bcm43436s" |
| 100 | RREPLACES:${PN}-bcm43455 = "linux-firmware-bcm43455" |
| 101 | RREPLACES:${PN}-bcm43456 = "linux-firmware-bcm43456" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 102 | |
| 103 | # Firmware files are generally not run on the CPU, so they can be |
| 104 | # allarch despite being architecture specific |
| 105 | INSANE_SKIP = "arch" |