summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorPeter A. Bigot <pab@pabigot.com>2018-05-10 19:33:45 -0500
committerAndrei Gherzan <andrei@gherzan.com>2018-05-14 10:34:08 +0100
commitf3ecec38aa8ae4137b1a0e11b925d0e736e8ffda (patch)
treef3175193e13d45c7d2935e1371397f098a3bbe80 /recipes-kernel
parentde8912cbcb06b221fb4617f3042e06b68f74c814 (diff)
downloadmeta-raspberrypi-f3ecec38aa8ae4137b1a0e11b925d0e736e8ffda.tar.gz
linux-firmware: restore and merge bluez-firmware
The attempt to Raspbian updated firmware blobs in packages separate from linux-firmware introduced unresolvable conflicts with the standard linux-firmware roll-up package. Revert to using an augmented linux-firmware recipe that overrides and adds firmware from two Raspbian repositories that have up-to-date images. Closes #244 Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux-firmware/linux-firmware-raspbian.bb55
-rw-r--r--recipes-kernel/linux-firmware/linux-firmware_%.bbappend77
2 files changed, 77 insertions, 55 deletions
diff --git a/recipes-kernel/linux-firmware/linux-firmware-raspbian.bb b/recipes-kernel/linux-firmware/linux-firmware-raspbian.bb
deleted file mode 100644
index d11a53b..0000000
--- a/recipes-kernel/linux-firmware/linux-firmware-raspbian.bb
+++ /dev/null
@@ -1,55 +0,0 @@
1SUMMARY = "Firmware files for use with Linux kernel"
2SECTION = "kernel"
3
4LICENSE = "Firmware-broadcom_bcm43xx"
5
6LIC_FILES_CHKSUM = "file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc"
7
8INHIBIT_DEFAULT_DEPS = "1"
9
10# These are not common licenses, set NO_GENERIC_LICENSE for them
11# so that the license files will be copied from fetched source
12NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx] = "LICENCE.broadcom_bcm43xx"
13
14SRCREV = "86e88fbf0345da49555d0ec34c80b4fbae7d0cd3"
15PV = "0.0+git${SRCPV}"
16
17SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree"
18
19UPSTREAM_VERSION_UNKNOWN = "1"
20
21S = "${WORKDIR}/git"
22
23inherit allarch
24
25CLEANBROKEN = "1"
26
27do_compile() {
28 :
29}
30
31do_install() {
32 install -d ${D}${nonarch_base_libdir}/firmware/brcm
33 cp ./LICENCE.broadcom_bcm43xx ${D}${nonarch_base_libdir}/firmware
34 cp -r ./brcm/brcmfmac43430* ${D}${nonarch_base_libdir}/firmware/brcm
35 cp -r ./brcm/brcmfmac43455* ${D}${nonarch_base_libdir}/firmware/brcm
36}
37
38PACKAGES = " \
39 ${PN}-broadcom-license \
40 ${PN}-bcm43430 \
41 ${PN}-bcm43455 \
42 "
43
44LICENSE_${PN}-bcm43430 = "Firmware-broadcom_bcm43xx"
45LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx"
46LICENSE_${PN}-broadcom-license = "Firmware-broadcom_bcm43xx"
47FILES_${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx"
48FILES_${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430*"
49FILES_${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455*"
50RDEPENDS_${PN}-bcm43430 += "${PN}-broadcom-license"
51RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license"
52
53# Firmware files are generally not ran on the CPU, so they can be
54# allarch despite being architecture specific
55INSANE_SKIP = "arch"
diff --git a/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
new file mode 100644
index 0000000..34d2b67
--- /dev/null
+++ b/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
@@ -0,0 +1,77 @@
1# Augments upstream linux-firmware with additional and updated images
2# from Raspbian:
3# https://github.com/RPi-Distro/firmware-nonfree
4# https://github.com/RPi-Distro/bluez-firmware
5
6LICENSE_append_rpi = "\
7 & Firmware-cypress \
8"
9
10LIC_FILES_CHKSUM_append_rpi = "\
11 file://LICENCE.cypress;md5=cbc5f665d04f741f1e006d2096236ba7 \
12"
13NO_GENERIC_LICENSE[Firmware-cypress] = "LICENCE.cypress"
14
15SRC_URI_append_rpi = " \
16 git://github.com/RPi-Distro/firmware-nonfree;destsuffix=raspbian-nf;name=raspbian-nf \
17 git://github.com/RPi-Distro/bluez-firmware;destsuffix=raspbian-bluez;name=raspbian-bluez \
18"
19
20SRCREV_raspbian-nf = "86e88fbf0345da49555d0ec34c80b4fbae7d0cd3"
21SRCREV_raspbian-bluez = "e28cd7ee8615de33aa7ec2b41d556af61a4a2707"
22SRCREV_FORMAT_rpi = "default+raspbian-nf+raspbian-bluez"
23
24do_install_append_rpi() {
25 install -d ${D}${nonarch_base_libdir}/firmware/brcm/
26
27 # Replace outdated linux-firmware files with updated ones from
28 # raspbian firmware-nonfree. Raspbian adds blobs and nvram
29 # definitions that are also necessary so copy those too.
30 for fw in brcmfmac43430-sdio brcmfmac43455-sdio ; do
31 install -m 0644 ${WORKDIR}/raspbian-nf/brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/
32 done
33
34 # Add missing Cypress Bluetooth files from raspbian bluez-firmware
35 for fw in BCM43430A1.hcd BCM4345C0.hcd ; do
36 install -m 0644 ${WORKDIR}/raspbian-bluez/broadcom/${fw} ${D}${nonarch_base_libdir}/firmware/brcm/
37 done
38}
39
40# NB: Must prepend, else these become empty and their content is left in
41# the roll-up package which precedes them.
42PACKAGES_prepend_rpi = "\
43 ${PN}-bcm43455 \
44 ${PN}-cypress-license \
45 ${PN}-bcm43430a1-hcd \
46 ${PN}-bcm4345c0-hcd \
47"
48
49# For additional Broadcom
50LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx"
51
52FILES_${PN}-bcm43430_append_rpi = " \
53 ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt \
54"
55FILES_${PN}-bcm43455 = " \
56 ${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.* \
57"
58
59RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license"
60
61# For additional Cypress
62FILES_${PN}-cypress-license = "\
63 ${nonarch_base_libdir}/firmware/LICENCE.cypress \
64"
65
66LICENSE_${PN}-bcm43430a1-hcd = "Firmware-cypress"
67LICENSE_${PN}-bcm4345c0-hcd = "Firmware-cypress"
68
69FILES_${PN}-bcm43430a1-hcd = " \
70 ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \
71"
72FILES_${PN}-bcm4345c0-hcd = " \
73 ${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \
74"
75
76RDEPENDS_${PN}-bcm43430a1-hcd += "${PN}-cypress-license"
77RDEPENDS_${PN}-bcm4345c0-hcd += "${PN}-cypress-license"