blob: 310d2f8446e1c4fb3bf9ed685c40a689d4bcdf71 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001SUMMARY = "Linux kernel Bluetooth firmware files from Raspbian distribution"
2DESCRIPTION = "Updated Bluetooth 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/bluez-firmware"
6SECTION = "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
17LICENSE = "Firmware-cypress-rpidistro"
18LIC_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
24NO_GENERIC_LICENSE[Firmware-cypress-rpidistro] = "LICENCE.cypress-rpidistro"
25
26SRC_URI = "git://github.com/RPi-Distro/bluez-firmware"
Andrew Geissler1c349142019-02-19 19:49:56 -060027SRCREV = "96eefffcccc725425fd83be5e0704a5c32b79e54"
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080028PV = "0.0+git${SRCPV}"
29
30S = "${WORKDIR}/git"
31
32inherit allarch
33
34CLEANBROKEN = "1"
35
36do_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.
42addtask extract_lic after do_unpack before do_patch
43
44do_compile() {
45 :
46}
47
48do_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
55PACKAGES = "\
56 ${PN}-cypress-license \
57 ${PN}-bcm43430a1-hcd \
58 ${PN}-bcm4345c0-hcd \
59"
60
61LICENSE_${PN}-bcm43430a1-hcd = "Firmware-cypress-rpidistro"
62LICENSE_${PN}-bcm4345c0-hcd = "Firmware-cypress-rpidistro"
63LICENSE_${PN}-cypress-license = "Firmware-cypress-rpidistro"
64
65FILES_${PN}-cypress-license = "\
66 ${nonarch_base_libdir}/firmware/LICENCE.cypress-rpidistro \
67"
68FILES_${PN}-bcm43430a1-hcd = "\
69 ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \
70"
71FILES_${PN}-bcm4345c0-hcd = "\
72 ${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \
73"
74
75RDEPENDS_${PN}-bcm43430a1-hcd += "${PN}-cypress-license"
76RDEPENDS_${PN}-bcm4345c0-hcd += "${PN}-cypress-license"
77RCONFLICTS_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd"
78RREPLACES_${PN}-bcm43430a1-hcd = "linux-firmware-bcm43430a1-hcd"
79RCONFLICTS_${PN}-bcm43435c0-hcd = "linux-firmware-bcm4345c0-hcd"
80RREPLACES_${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
84INSANE_SKIP = "arch"