anchor.diff:  SECTION = "kernel"
   
   # In maintained upstream linux-firmware:
  -# * brcmfmac43430-sdio falls under LICENCE.cypress
  -# * brcmfmac43455-sdio falls under LICENCE.broadcom_bcm43xx
  -# * brcmfmac43456-sdio falls under LICENCE.broadcom_bcm43xx
  +# * brcmfmac43430-sdio falls under LICENSE.cypress
  +# * brcmfmac43455-sdio falls under LICENSE.broadcom_bcm43xx
  +# * brcmfmac43456-sdio falls under LICENSE.broadcom_bcm43xx
   #
  -# It is likely[^1] that both of these should be under LICENCE.cypress.
  -# Further, at this time the text of LICENCE.broadcom_bcm43xx is the same
  +# It is likely[^1] that both of these should be under LICENSE.cypress.
  +# Further, at this time the text of LICENSE.broadcom_bcm43xx is the same
   # in linux-firmware and RPi-Distro/firmware-nonfree, but this may
   # change.
   #
  
positive.code: }
  
  do_install() {
      install -d ${D}${nonarch_base_libdir}/firmware/brcm
  
      cp ./LICENCE.broadcom_bcm43xx ${D}${nonarch_base_libdir}/firmware/LICENCE.broadcom_bcm43xx-rpidistro
  
      # 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 brcmfmac43456-sdio ; do
          install -m 0644 brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/
      done
      # add compat links. Fixes errors like
      # brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2
      ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt
      ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt
      ln -s brcmfmac43455-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt
      ln -s brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt
      ln -s brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.txt
  }
  
  PACKAGES = "\
  
negative.code: # [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1
  LICENSE = "\
      Firmware-broadcom_bcm43xx-rpidistro \
  "
  LIC_FILES_CHKSUM = "\
      file://debian/config/brcm80211/LICENSE;md5=8cba1397cda6386db37210439a0da3eb \
  "
  
  # These are not common licenses, set NO_GENERIC_LICENSE for them
  # so that the license files will be copied from fetched source
  NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "debian/config/brcm80211/LICENSE"
  
  SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree;branch=bullseye;protocol=https"
  
  SRCREV = "b3eec612566ca08913f0830d299f4df70297428f"
  PV = "20210315-3+rpt3"
  
  S = "${WORKDIR}/git"
  
  