blob: 2bc55223b5f2182453130d2ec2db067313daacab [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 \
Brad Bishopf76da502019-10-10 08:51:21 -040028 file://WHENCE;md5=7b12b2224438186e4c97c4c7f3a5cc28 \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080029"
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 Bishopf76da502019-10-10 08:51:21 -040036SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree"
37
38SRCREV = "f0ad1a42b051aa9da1d9e1dc606dd68ec2f163a5"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080039PV = "0.0+git${SRCPV}"
40
41S = "${WORKDIR}/git"
42
43inherit allarch
44
45CLEANBROKEN = "1"
46
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080047do_compile() {
48 :
49}
50
51do_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
62}
63
64PACKAGES = "\
65 ${PN}-broadcom-license \
66 ${PN}-bcm43430 \
67 ${PN}-bcm43455 \
68"
69
70LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro"
71LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro"
72LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro"
73FILES_${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro"
74FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430*"
75FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455*"
76RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license"
77RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license"
78RCONFLICTS_${PN}-bcm43430 = "\
79 linux-firmware-bcm43430 \
80 linux-firmware-raspbian-bcm43430 \
81"
82RREPLACES_${PN}-bcm43430 = "\
83 linux-firmware-bcm43430 \
84 linux-firmware-raspbian-bcm43430 \
85"
86RCONFLICTS_${PN}-bcm43455 = "\
87 linux-firmware-bcm43455 \
88 linux-firmware-raspbian-bcm43455 \
89"
90RREPLACES_${PN}-bcm43455 = "\
91 linux-firmware-bcm43455 \
92 linux-firmware-raspbian-bcm43455 \
93"
94
95# Firmware files are generally not run on the CPU, so they can be
96# allarch despite being architecture specific
97INSANE_SKIP = "arch"