blob: 653f6e0705b2454e245fad2a919d7f370838e053 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "Linux kernel firmware files from Raspbian distribution"
2DESCRIPTION = "Updated firmware files for RaspberryPi hardware. \
3RPi-Distro obtains these directly from Cypress; they are not submitted \
4to linux-firmware for general use."
5HOMEPAGE = "https://github.com/RPi-Distro/firmware-nonfree"
6SECTION = "kernel"
7
Patrick Williamsdb4c27e2022-08-05 08:10:29 -05008LICENSE = "GPL-2.0-only & binary-redist-Cypress-rpidistro & Synaptics-rpidistro"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08009LIC_FILES_CHKSUM = "\
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050010 file://debian/config/brcm80211/copyright;md5=b0630b02d90e3da72206c909b6aecc8c \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080011"
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050012# Where these are no common licenses, set NO_GENERIC_LICENSE so that the
13# license files will be copied from the fetched source.
14NO_GENERIC_LICENSE[binary-redist-Cypress-rpidistro] = "debian/config/brcm80211/copyright"
15NO_GENERIC_LICENSE[Synaptics-rpidistro] = "debian/config/brcm80211/copyright"
16LICENSE_FLAGS = "synaptics-killswitch"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017
Andrew Geissler87f5cff2022-09-30 13:13:31 -050018SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree;branch=bullseye;protocol=https \
19 file://0001-Default-43455-firmware-to-standard-variant.patch \
20"
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050021SRCREV = "541e5a05d152e7e6f0d9be45622e4a3741e51c02"
22PV = "20210315-3+rpt7"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080023S = "${WORKDIR}/git"
24
25inherit allarch
26
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050027do_configure[noexec] = "1"
28do_compile[noexec] = "1"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029
30do_install() {
Andrew Geissler595f6302022-01-24 19:11:47 +000031 install -d ${D}${nonarch_base_libdir}/firmware/brcm ${D}${nonarch_base_libdir}/firmware/cypress
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080032
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050033 cp debian/config/brcm80211/copyright ${D}${nonarch_base_libdir}/firmware/copyright.firmware-nonfree-rpidistro
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080034
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050035 for fw in \
36 brcmfmac43430-sdio \
37 brcmfmac43436-sdio \
38 brcmfmac43436s-sdio \
39 brcmfmac43455-sdio \
40 brcmfmac43456-sdio; do
Andrew Geissler595f6302022-01-24 19:11:47 +000041 cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042 done
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050043
Andrew Geissler595f6302022-01-24 19:11:47 +000044 cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/cypress/* ${D}${nonarch_base_libdir}/firmware/cypress/
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050045
Patrick Williams03907ee2022-05-01 06:28:52 -050046 rm ${D}${nonarch_base_libdir}/firmware/cypress/README.txt
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050047
Andrew Geissler5c4154f2020-10-16 10:13:56 -050048 # add compat links. Fixes errors like
Andrew Geissler595f6302022-01-24 19:11:47 +000049 # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-compute-module.txt failed with error -2
Patrick Williams0ca19cc2021-08-16 14:03:13 -050050 ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt
Andrew Geisslerd5838332022-05-27 11:33:10 -050051 # 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
Andrew Geissler9347dd42023-03-03 12:38:41 -060053 # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.bin failed with error -2
54 ln -s brcmfmac43430-sdio.bin ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.bin
55 # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.bin failed with error -2
56 ln -s brcmfmac43430-sdio.bin ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.bin
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080057}
58
59PACKAGES = "\
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080060 ${PN}-bcm43430 \
Andrew Geissler595f6302022-01-24 19:11:47 +000061 ${PN}-bcm43436 \
62 ${PN}-bcm43436s \
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050063 ${PN}-bcm43455 \
64 ${PN}-bcm43456 \
65 ${PN}-license \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080066"
67
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050068LICENSE:${PN}-bcm43430 = "binary-redist-Cypress-rpidistro"
69LICENSE:${PN}-bcm43436 = "Synaptics-rpidistro"
70LICENSE:${PN}-bcm43436s = "Synaptics-rpidistro"
71LICENSE:${PN}-bcm43455 = "binary-redist-Cypress-rpidistro"
72LICENSE:${PN}-bcm43456 = "Synaptics-rpidistro"
73LICENSE:${PN}-license = "GPL-2.0-only"
74
75FILES:${PN}-bcm43430 = " \
76 ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430* \
77 ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.bin \
78 ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.clm_blob \
79"
Andrew Geissler595f6302022-01-24 19:11:47 +000080FILES:${PN}-bcm43436 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436-*"
81FILES:${PN}-bcm43436s = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436s*"
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050082FILES:${PN}-bcm43455 = " \
83 ${nonarch_base_libdir}/firmware/brcm/brcmfmac43455* \
84 ${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio* \
85"
Patrick Williams213cb262021-08-07 19:21:33 -050086FILES:${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*"
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050087FILES:${PN}-license = "${nonarch_base_libdir}/firmware/copyright.firmware-nonfree-rpidistro"
Andrew Geissler595f6302022-01-24 19:11:47 +000088
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050089RDEPENDS:${PN}-bcm43430 += "${PN}-license"
90RDEPENDS:${PN}-bcm43436 += "${PN}-license"
91RDEPENDS:${PN}-bcm43436s += "${PN}-license"
92RDEPENDS:${PN}-bcm43455 += "${PN}-license"
93RDEPENDS:${PN}-bcm43456 += "${PN}-license"
Andrew Geissler595f6302022-01-24 19:11:47 +000094
Patrick Williamsdb4c27e2022-08-05 08:10:29 -050095RCONFLICTS:${PN}-bcm43430 = "linux-firmware-raspbian-bcm43430"
96RCONFLICTS:${PN}-bcm43436 = "linux-firmware-bcm43436"
97RCONFLICTS:${PN}-bcm43436s = "linux-firmware-bcm43436s"
98RCONFLICTS:${PN}-bcm43455 = "linux-firmware-bcm43455"
99RCONFLICTS:${PN}-bcm43456 = "linux-firmware-bcm43456"
Andrew Geissler595f6302022-01-24 19:11:47 +0000100
Patrick Williamsdb4c27e2022-08-05 08:10:29 -0500101RREPLACES:${PN}-bcm43430 = "linux-firmware-bcm43430"
102RREPLACES:${PN}-bcm43436 = "linux-firmware-bcm43436"
103RREPLACES:${PN}-bcm43436s = "linux-firmware-bcm43436s"
104RREPLACES:${PN}-bcm43455 = "linux-firmware-bcm43455"
105RREPLACES:${PN}-bcm43456 = "linux-firmware-bcm43456"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -0800106
107# Firmware files are generally not run on the CPU, so they can be
108# allarch despite being architecture specific
109INSANE_SKIP = "arch"