Yocto 2.5
Move OpenBMC to Yocto 2.5(sumo)
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I5c5ad6904a16e14c1c397f0baf10c9d465594a78
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin
deleted file mode 100644
index 6b955da..0000000
--- a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.bin
+++ /dev/null
Binary files differ
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.txt b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.txt
deleted file mode 100644
index 3d917a7..0000000
--- a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/files/brcmfmac43430-sdio.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-# NVRAM file for BCM943430WLSELG
-# 2.4 GHz, 20 MHz BW mode
-
-# The following parameter values are just placeholders, need to be updated.
-manfid=0x2d0
-prodid=0x0726
-vendid=0x14e4
-devid=0x43e2
-boardtype=0x0726
-boardrev=0x1202
-boardnum=22
-macaddr=00:90:4c:c5:12:38
-sromrev=11
-boardflags=0x00404201
-boardflags3=0x08000000
-xtalfreq=37400
-#xtalfreq=19200
-nocrc=1
-ag0=255
-aa2g=1
-ccode=ALL
-
-pa0itssit=0x20
-extpagain2g=0
-
-#PA parameters for 2.4GHz, measured at CHIP OUTPUT
-pa2ga0=-168,7161,-820
-AvVmid_c0=0x0,0xc8
-cckpwroffset0=5
-
-# PPR params
-maxp2ga0=84
-txpwrbckof=6
-cckbw202gpo=0
-legofdmbw202gpo=0x66111111
-mcsbw202gpo=0x77711111
-propbw202gpo=0xdd
-
-# OFDM IIR :
-ofdmdigfilttype=18
-ofdmdigfilttypebe=18
-# PAPD mode:
-papdmode=1
-papdvalidtest=1
-pacalidx2g=32
-papdepsoffset=-36
-papdendidx=61
-
-il0macaddr=00:90:4c:c5:12:38
-wl0id=0x431b
-
-deadman_to=0xffffffff
-# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG
-muxenab=0x1
-# CLDO PWM voltage settings - 0x4 - 1.1 volt
-#cldo_pwm=0x4
-
-#VCO freq 326.4MHz
-spurconfig=0x3
diff --git a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
index 565b735..34d2b67 100644
--- a/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
+++ b/import-layers/meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_%.bbappend
@@ -1,26 +1,77 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+# Augments upstream linux-firmware with additional and updated images
+# from Raspbian:
+# https://github.com/RPi-Distro/firmware-nonfree
+# https://github.com/RPi-Distro/bluez-firmware
-SRC_URI += " \
- file://brcmfmac43430-sdio.bin \
- file://brcmfmac43430-sdio.txt \
- "
+LICENSE_append_rpi = "\
+ & Firmware-cypress \
+"
-do_install_append() {
- # Overwrite v7.45.41.26 by the one we currently provide in this layer
- # (v7.45.41.46)
- local _firmware="brcmfmac43430-sdio.bin"
- local _oldmd5=9258986488eca9fe5343b0d6fe040f8e
- if [ "$(md5sum ${D}/lib/firmware/brcm/$_firmware | awk '{print $1}')" != "$_oldmd5" ]; then
- _firmware=""
- bbwarn "linux-firmware stopped providing brcmfmac43430 v7.45.41.26."
- else
- _firmware="${WORKDIR}/$_firmware"
- fi
+LIC_FILES_CHKSUM_append_rpi = "\
+ file://LICENCE.cypress;md5=cbc5f665d04f741f1e006d2096236ba7 \
+"
+NO_GENERIC_LICENSE[Firmware-cypress] = "LICENCE.cypress"
- mkdir -p ${D}/lib/firmware/brcm
- install -m 0644 $_firmware ${WORKDIR}/brcmfmac43430-sdio.txt ${D}/lib/firmware/brcm
+SRC_URI_append_rpi = " \
+ git://github.com/RPi-Distro/firmware-nonfree;destsuffix=raspbian-nf;name=raspbian-nf \
+ git://github.com/RPi-Distro/bluez-firmware;destsuffix=raspbian-bluez;name=raspbian-bluez \
+"
+
+SRCREV_raspbian-nf = "86e88fbf0345da49555d0ec34c80b4fbae7d0cd3"
+SRCREV_raspbian-bluez = "e28cd7ee8615de33aa7ec2b41d556af61a4a2707"
+SRCREV_FORMAT_rpi = "default+raspbian-nf+raspbian-bluez"
+
+do_install_append_rpi() {
+ install -d ${D}${nonarch_base_libdir}/firmware/brcm/
+
+ # Replace outdated linux-firmware files with updated ones from
+ # raspbian firmware-nonfree. Raspbian adds blobs and nvram
+ # definitions that are also necessary so copy those too.
+ for fw in brcmfmac43430-sdio brcmfmac43455-sdio ; do
+ install -m 0644 ${WORKDIR}/raspbian-nf/brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/
+ done
+
+ # Add missing Cypress Bluetooth files from raspbian bluez-firmware
+ for fw in BCM43430A1.hcd BCM4345C0.hcd ; do
+ install -m 0644 ${WORKDIR}/raspbian-bluez/broadcom/${fw} ${D}${nonarch_base_libdir}/firmware/brcm/
+ done
}
-FILES_${PN}-bcm43430 += " \
- /lib/firmware/brcm/brcmfmac43430-sdio.txt \
+# NB: Must prepend, else these become empty and their content is left in
+# the roll-up package which precedes them.
+PACKAGES_prepend_rpi = "\
+ ${PN}-bcm43455 \
+ ${PN}-cypress-license \
+ ${PN}-bcm43430a1-hcd \
+ ${PN}-bcm4345c0-hcd \
"
+
+# For additional Broadcom
+LICENSE_${PN}-bcm43455 = "Firmware-broadcom_bcm43xx"
+
+FILES_${PN}-bcm43430_append_rpi = " \
+ ${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt \
+"
+FILES_${PN}-bcm43455 = " \
+ ${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.* \
+"
+
+RDEPENDS_${PN}-bcm43455 += "${PN}-broadcom-license"
+
+# For additional Cypress
+FILES_${PN}-cypress-license = "\
+ ${nonarch_base_libdir}/firmware/LICENCE.cypress \
+"
+
+LICENSE_${PN}-bcm43430a1-hcd = "Firmware-cypress"
+LICENSE_${PN}-bcm4345c0-hcd = "Firmware-cypress"
+
+FILES_${PN}-bcm43430a1-hcd = " \
+ ${nonarch_base_libdir}/firmware/brcm/BCM43430A1.hcd \
+"
+FILES_${PN}-bcm4345c0-hcd = " \
+ ${nonarch_base_libdir}/firmware/brcm/BCM4345C0.hcd \
+"
+
+RDEPENDS_${PN}-bcm43430a1-hcd += "${PN}-cypress-license"
+RDEPENDS_${PN}-bcm4345c0-hcd += "${PN}-cypress-license"