diff options
| author | Peter A. Bigot <pab@pabigot.com> | 2018-11-13 14:44:21 -0600 |
|---|---|---|
| committer | Andrei Gherzan <andrei@gherzan.ro> | 2018-11-23 16:25:34 +0200 |
| commit | bfc35b773ff405394d066d7d8efb32ced3ac0410 (patch) | |
| tree | 504a7dfe9e97d06dcb71391a018281ba3f96cd34 /recipes-kernel/bluez-firmware-rpidistro | |
| parent | 10cee099bc6f1f805367e866598af6bf44e8f1b7 (diff) | |
| download | meta-raspberrypi-bfc35b773ff405394d066d7d8efb32ced3ac0410.tar.gz | |
linux-firmware: replace machine override with new recipes
Raspberry Pi hardware requires firmware that supersedes or is not
present in the standard linux-firmware distribution. These files are
maintained in the RPi-Distro project on github.
Several attempts have been made to reconcile conflicts between what's in
linux-firmware and what the hardware needs. The existing approach is
functional but not maintainable since it combines material from three
repositories into a single package that claims to be linux-firmware.
Remove the appends that change the content of linux-firmware for rpi
hardware. Add two new recipes that follow the RPi-Distro repositories:
* firmware-nonfree which forked from linux-firmware and replaces
content is provided as linux-firmware-rpidistro;
* bluez-firmware which forked from (very old) bluez and adds content is
provided as bluez-firmware-rpidistro.
The packages are named to make clear that these come from RPi-Distro,
rather than generic sources. Licensing attempts to record the state of
licensing as documented in RPi-Distro.
Resolves: #298
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Diffstat (limited to 'recipes-kernel/bluez-firmware-rpidistro')
| -rw-r--r-- | recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb b/recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb new file mode 100644 index 0000000..b16b2c1 --- /dev/null +++ b/recipes-kernel/bluez-firmware-rpidistro/bluez-firmware-rpidistro_git.bb | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | SUMMARY = "Linux kernel Bluetooth firmware files from Raspbian distribution" | ||
| 2 | DESCRIPTION = "Updated Bluetooth 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/bluez-firmware" | ||
| 6 | SECTION = "kernel" | ||
| 7 | |||
| 8 | # Upstream has provided[^1] licensing information in the Debian | ||
| 9 | # copyright file. The wording of the Cypress license subsequently | ||
| 10 | # changed in linux-firmware. | ||
| 11 | # | ||
| 12 | # Rather than make assumptions about what's supposed to be what, we'll | ||
| 13 | # use the license implied by the source of these files, named to avoid | ||
| 14 | # conflicts with linux-firmware. | ||
| 15 | # | ||
| 16 | # [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1 | ||
| 17 | LICENSE = "Firmware-cypress-rpidistro" | ||
| 18 | LIC_FILES_CHKSUM = "\ | ||
| 19 | file://LICENCE.cypress-rpidistro;md5=852f9d10cbedba1f6c439729bd0617b4 \ | ||
| 20 | " | ||
| 21 | |||
| 22 | # These are not common licenses, set NO_GENERIC_LICENSE for them | ||
| 23 | # so that the license files will be copied from fetched source | ||
| 24 | NO_GENERIC_LICENSE[Firmware-cypress-rpidistro] = "LICENCE.cypress-rpidistro" | ||
| 25 | |||
| 26 | SRC_URI = "git://github.com/RPi-Distro/bluez-firmware" | ||
| 27 | SRCREV = "ade2bae1aaaebede09abb8fb546f767a0e4c7804" | ||
| 28 | PV = "0.0+git${SRCPV}" | ||
| 29 | |||
| 30 | S = "${WORKDIR}/git" | ||
| 31 | |||
| 32 | inherit allarch | ||
| 33 | |||
| 34 | CLEANBROKEN = "1" | ||
| 35 | |||
| 36 | do_extract_lic() { | ||
| 37 | # Extract the license from the Debian copyright file | ||
| 38 | sed -e '1,23d' ${S}/debian/copyright > ${S}/LICENCE.cypress-rpidistro | ||
| 39 | } | ||
| 40 | # Must be before both do_install and do_populate_lic. Putting it before | ||
| 41 | # their common ancestor works; other approaches do not. | ||
| 42 | addtask extract_lic after do_unpack before do_patch | ||
| 43 | |||
| 44 | do_compile() { | ||
| 45 | : | ||
| 46 | } | ||
| 47 | |||
| 48 | do_install() { | ||
| 49 | install -d ${D}${nonarch_base_libdir}/firmware/brcm | ||
| 50 | |||
| 51 | cp LICENCE.cypress-rpidistro ${D}${nonarch_base_libdir}/firmware | ||
| 52 | install -m 0644 broadcom/BCM434*.hcd ${D}${nonarch_base_libdir}/firmware/brcm/ | ||
| 53 | } | ||
| 54 | |||
| 55 | PACKAGES = "\ | ||
| 56 | ${PN}-cypress-license \ | ||
| 57 | ${PN}-bcm43430a1-hcd \ | ||
| 58 | ${PN}-bcm4345c0-hcd \ | ||
| 59 | " | ||
| 60 | |||
| 61 | LICENSE_${PN}-bcm43430a1-hcd = "Firmware-cypress-rpidistro" | ||
| 62 | LICENSE_${PN}-bcm4345c0-hcd = "Firmware-cypress-rpidistro" | ||
| 63 | LICENSE_${PN}-cypress-license = "Firmware-cypress-rpidistro" | ||
| 64 | |||
| 65 | FILES_${PN}-cypress-license = "\ | ||
| 66 | ${nonarch_base_libdir}/firmware/LICENCE.cypress-rpidistro \ | ||
| 67 | " | ||
| 68 | FILES_${PN}-bcm43430a1-hcd = "\ | ||
| 69 | ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \ | ||
| 70 | " | ||
| 71 | FILES_${PN}-bcm4345c0-hcd = "\ | ||
| 72 | ${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \ | ||
| 73 | " | ||
| 74 | |||
| 75 | RDEPENDS_${PN}-bcm43430a1-hcd += "${PN}-cypress-license" | ||
| 76 | RDEPENDS_${PN}-bcm4345c0-hcd += "${PN}-cypress-license" | ||
| 77 | RCONFLICTS_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" | ||
| 78 | RREPLACES_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd" | ||
| 79 | RCONFLICTS_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" | ||
| 80 | RREPLACES_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd" | ||
| 81 | |||
| 82 | # Firmware files are generally not run on the CPU, so they can be | ||
| 83 | # allarch despite being architecture specific | ||
| 84 | INSANE_SKIP = "arch" | ||
