blob: 39ffbf54bb3e71db965ad15a2cbfd982f0ec5d00 [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
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
22LICENSE = "\
23 Firmware-broadcom_bcm43xx-rpidistro \
24 & WHENCE \
25"
26LIC_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
33NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "LICENCE.broadcom_bcm43xx"
34NO_GENERIC_LICENSE[WHENCE] = "WHENCE"
35
Brad Bishop26bdd442019-08-16 17:08:17 -040036SRC_URI = " \
37 git://github.com/RPi-Distro/firmware-nonfree \
38 file://0001-brcmfmac43455-sdio.txt-Follow-raspbian-change-for-bo.patch \
39 "
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080040SRCREV = "b518de45ced519e8f7a499f4778100173402ae43"
41PV = "0.0+git${SRCPV}"
42
43S = "${WORKDIR}/git"
44
45inherit allarch
46
47CLEANBROKEN = "1"
48
Brad Bishop26bdd442019-08-16 17:08:17 -040049do_unpack_append() {
50 bb.build.exec_func('do_clean_pc', d)
51}
52do_clean_pc() {
53 rm -rf ${S}/.pc
54}
55
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080056do_compile() {
57 :
58}
59
60do_install() {
61 install -d ${D}${nonarch_base_libdir}/firmware/brcm
62
63 cp ./LICENCE.broadcom_bcm43xx ${D}${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro
64
65 # Replace outdated linux-firmware files with updated ones from
66 # raspbian firmware-nonfree. Raspbian adds blobs and nvram
67 # definitions that are also necessary so copy those too.
68 for fw in brcmfmac43430-sdio brcmfmac43455-sdio ; do
69 install -m 0644 brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/
70 done
71}
72
73PACKAGES = "\
74 ${PN}-broadcom-license \
75 ${PN}-bcm43430 \
76 ${PN}-bcm43455 \
77"
78
79LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro"
80LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro"
81LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro"
82FILES_${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro"
83FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430*"
84FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455*"
85RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license"
86RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license"
87RCONFLICTS_${PN}-bcm43430 = "\
88 linux-firmware-bcm43430 \
89 linux-firmware-raspbian-bcm43430 \
90"
91RREPLACES_${PN}-bcm43430 = "\
92 linux-firmware-bcm43430 \
93 linux-firmware-raspbian-bcm43430 \
94"
95RCONFLICTS_${PN}-bcm43455 = "\
96 linux-firmware-bcm43455 \
97 linux-firmware-raspbian-bcm43455 \
98"
99RREPLACES_${PN}-bcm43455 = "\
100 linux-firmware-bcm43455 \
101 linux-firmware-raspbian-bcm43455 \
102"
103
104# Firmware files are generally not run on the CPU, so they can be
105# allarch despite being architecture specific
106INSANE_SKIP = "arch"