mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-19 21:09:03 +02:00
linux-firmware-rpidistro: Revamp, cleanup and restructure recipe
Besides general cleanup and formatting (for example dropping the conflicts and replaces on the raspbian packages which was deprecated long ago) this also cleans up the license of the package as per the updated upstream copyright file. This recipe now provides firmware files of two different licenses. bcm43430 bcm43455 - binary-redist-Cypress bcm43436 bcm43436s bcm43456 - Synaptics The license file itself is GPLv2 as other debian files. Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
This commit is contained in:
parent
3122d5291d
commit
1b4215d5d0
|
@ -5,60 +5,43 @@ to linux-firmware for general use."
|
||||||
HOMEPAGE = "https://github.com/RPi-Distro/firmware-nonfree"
|
HOMEPAGE = "https://github.com/RPi-Distro/firmware-nonfree"
|
||||||
SECTION = "kernel"
|
SECTION = "kernel"
|
||||||
|
|
||||||
# In maintained upstream linux-firmware:
|
LICENSE = "GPL-2.0-only & binary-redist-Cypress-rpidistro & Synaptics-rpidistro"
|
||||||
# * 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 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.
|
|
||||||
#
|
|
||||||
# Rather than make assumptions about what's supposed to be what, we'll
|
|
||||||
# use the license implied by the source of these files, named to avoid
|
|
||||||
# conflicts with linux-firmware.
|
|
||||||
#
|
|
||||||
# [^1]: https://github.com/RPi-Distro/bluez-firmware/issues/1
|
|
||||||
LICENSE = "\
|
|
||||||
Firmware-broadcom_bcm43xx-rpidistro \
|
|
||||||
"
|
|
||||||
LIC_FILES_CHKSUM = "\
|
LIC_FILES_CHKSUM = "\
|
||||||
file://debian/config/brcm80211/copyright;md5=b0630b02d90e3da72206c909b6aecc8c \
|
file://debian/config/brcm80211/copyright;md5=b0630b02d90e3da72206c909b6aecc8c \
|
||||||
"
|
"
|
||||||
|
# Where these are no common licenses, set NO_GENERIC_LICENSE so that the
|
||||||
# These are not common licenses, set NO_GENERIC_LICENSE for them
|
# license files will be copied from the fetched source.
|
||||||
# so that the license files will be copied from fetched source
|
NO_GENERIC_LICENSE[binary-redist-Cypress-rpidistro] = "debian/config/brcm80211/copyright"
|
||||||
NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx-rpidistro] = "debian/config/brcm80211/copyright"
|
NO_GENERIC_LICENSE[Synaptics-rpidistro] = "debian/config/brcm80211/copyright"
|
||||||
|
|
||||||
SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree;branch=bullseye;protocol=https"
|
SRC_URI = "git://github.com/RPi-Distro/firmware-nonfree;branch=bullseye;protocol=https"
|
||||||
|
|
||||||
SRCREV = "541e5a05d152e7e6f0d9be45622e4a3741e51c02"
|
SRCREV = "541e5a05d152e7e6f0d9be45622e4a3741e51c02"
|
||||||
PV = "20210315-3+rpt7"
|
PV = "20210315-3+rpt7"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
inherit allarch
|
inherit allarch
|
||||||
|
|
||||||
CLEANBROKEN = "1"
|
do_configure[noexec] = "1"
|
||||||
|
do_compile[noexec] = "1"
|
||||||
do_compile() {
|
|
||||||
:
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
install -d ${D}${nonarch_base_libdir}/firmware/brcm ${D}${nonarch_base_libdir}/firmware/cypress
|
install -d ${D}${nonarch_base_libdir}/firmware/brcm ${D}${nonarch_base_libdir}/firmware/cypress
|
||||||
|
|
||||||
cp debian/config/brcm80211/copyright ${D}${nonarch_base_libdir}/firmware/copyright.broadcom_bcm43xx-rpidistro
|
cp debian/config/brcm80211/copyright ${D}${nonarch_base_libdir}/firmware/copyright.firmware-nonfree-rpidistro
|
||||||
|
|
||||||
# Replace outdated linux-firmware files with updated ones from
|
for fw in \
|
||||||
# raspbian firmware-nonfree. Raspbian adds blobs and nvram
|
brcmfmac43430-sdio \
|
||||||
# definitions that are also necessary so copy those too.
|
brcmfmac43436-sdio \
|
||||||
for fw in brcmfmac43430-sdio brcmfmac43436-sdio brcmfmac43436s-sdio brcmfmac43455-sdio brcmfmac43456-sdio ; do
|
brcmfmac43436s-sdio \
|
||||||
|
brcmfmac43455-sdio \
|
||||||
|
brcmfmac43456-sdio; do
|
||||||
cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/
|
cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/brcm/${fw}.* ${D}${nonarch_base_libdir}/firmware/brcm/
|
||||||
done
|
done
|
||||||
|
|
||||||
cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/cypress/* ${D}${nonarch_base_libdir}/firmware/cypress/
|
cp -R --no-dereference --preserve=mode,links -v debian/config/brcm80211/cypress/* ${D}${nonarch_base_libdir}/firmware/cypress/
|
||||||
|
|
||||||
rm ${D}${nonarch_base_libdir}/firmware/cypress/README.txt
|
rm ${D}${nonarch_base_libdir}/firmware/cypress/README.txt
|
||||||
|
|
||||||
# add compat links. Fixes errors like
|
# add compat links. Fixes errors like
|
||||||
# brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-compute-module.txt failed with error -2
|
# brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,4-model-compute-module.txt failed with error -2
|
||||||
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,4-compute-module.txt
|
||||||
|
@ -67,77 +50,52 @@ do_install() {
|
||||||
}
|
}
|
||||||
|
|
||||||
PACKAGES = "\
|
PACKAGES = "\
|
||||||
${PN}-broadcom-license \
|
|
||||||
${PN}-bcm43430 \
|
${PN}-bcm43430 \
|
||||||
${PN}-bcm43455 \
|
|
||||||
${PN}-bcm43456 \
|
|
||||||
${PN}-bcm43436 \
|
${PN}-bcm43436 \
|
||||||
${PN}-bcm43436s \
|
${PN}-bcm43436s \
|
||||||
|
${PN}-bcm43455 \
|
||||||
|
${PN}-bcm43456 \
|
||||||
|
${PN}-license \
|
||||||
"
|
"
|
||||||
|
|
||||||
LICENSE:${PN}-bcm43430 = "Firmware-broadcom_bcm43xx-rpidistro"
|
LICENSE:${PN}-bcm43430 = "binary-redist-Cypress-rpidistro"
|
||||||
LICENSE:${PN}-bcm43436 = "Firmware-broadcom_bcm43xx-rpidistro"
|
LICENSE:${PN}-bcm43436 = "Synaptics-rpidistro"
|
||||||
LICENSE:${PN}-bcm43436s = "Firmware-broadcom_bcm43xx-rpidistro"
|
LICENSE:${PN}-bcm43436s = "Synaptics-rpidistro"
|
||||||
LICENSE:${PN}-bcm43455 = "Firmware-broadcom_bcm43xx-rpidistro"
|
LICENSE:${PN}-bcm43455 = "binary-redist-Cypress-rpidistro"
|
||||||
LICENSE:${PN}-bcm43456 = "Firmware-broadcom_bcm43xx-rpidistro"
|
LICENSE:${PN}-bcm43456 = "Synaptics-rpidistro"
|
||||||
LICENSE:${PN}-broadcom-license = "Firmware-broadcom_bcm43xx-rpidistro"
|
LICENSE:${PN}-license = "GPL-2.0-only"
|
||||||
FILES:${PN}-broadcom-license = "${nonarch_base_libdir}/firmware/copyright.broadcom_bcm43xx-rpidistro"
|
|
||||||
FILES:${PN}-bcm43430 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43430* ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.bin ${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.clm_blob"
|
FILES:${PN}-bcm43430 = " \
|
||||||
|
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430* \
|
||||||
|
${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.bin \
|
||||||
|
${nonarch_base_libdir}/firmware/cypress/cyfmac43430-sdio.clm_blob \
|
||||||
|
"
|
||||||
FILES:${PN}-bcm43436 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436-*"
|
FILES:${PN}-bcm43436 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436-*"
|
||||||
FILES:${PN}-bcm43436s = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436s*"
|
FILES:${PN}-bcm43436s = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43436s*"
|
||||||
FILES:${PN}-bcm43455 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43455* ${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio*"
|
FILES:${PN}-bcm43455 = " \
|
||||||
|
${nonarch_base_libdir}/firmware/brcm/brcmfmac43455* \
|
||||||
|
${nonarch_base_libdir}/firmware/cypress/cyfmac43455-sdio* \
|
||||||
|
"
|
||||||
FILES:${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*"
|
FILES:${PN}-bcm43456 = "${nonarch_base_libdir}/firmware/brcm/brcmfmac43456*"
|
||||||
RDEPENDS:${PN}-bcm43430 += "${PN}-broadcom-license"
|
FILES:${PN}-license = "${nonarch_base_libdir}/firmware/copyright.firmware-nonfree-rpidistro"
|
||||||
RDEPENDS:${PN}-bcm43436 += "${PN}-broadcom-license"
|
|
||||||
RDEPENDS:${PN}-bcm43436s += "${PN}-broadcom-license"
|
|
||||||
RDEPENDS:${PN}-bcm43455 += "${PN}-broadcom-license"
|
|
||||||
RDEPENDS:${PN}-bcm43456 += "${PN}-broadcom-license"
|
|
||||||
RCONFLICTS:${PN}-bcm43430 = "\
|
|
||||||
linux-firmware-bcm43430 \
|
|
||||||
linux-firmware-raspbian-bcm43430 \
|
|
||||||
"
|
|
||||||
|
|
||||||
RREPLACES:${PN}-bcm43430 = "\
|
RDEPENDS:${PN}-bcm43430 += "${PN}-license"
|
||||||
linux-firmware-bcm43430 \
|
RDEPENDS:${PN}-bcm43436 += "${PN}-license"
|
||||||
linux-firmware-raspbian-bcm43430 \
|
RDEPENDS:${PN}-bcm43436s += "${PN}-license"
|
||||||
"
|
RDEPENDS:${PN}-bcm43455 += "${PN}-license"
|
||||||
|
RDEPENDS:${PN}-bcm43456 += "${PN}-license"
|
||||||
|
|
||||||
RCONFLICTS:${PN}-bcm43436 = "\
|
RCONFLICTS:${PN}-bcm43430 = "linux-firmware-raspbian-bcm43430"
|
||||||
linux-firmware-bcm43436 \
|
RCONFLICTS:${PN}-bcm43436 = "linux-firmware-bcm43436"
|
||||||
linux-firmware-raspbian-bcm43436 \
|
RCONFLICTS:${PN}-bcm43436s = "linux-firmware-bcm43436s"
|
||||||
"
|
RCONFLICTS:${PN}-bcm43455 = "linux-firmware-bcm43455"
|
||||||
|
RCONFLICTS:${PN}-bcm43456 = "linux-firmware-bcm43456"
|
||||||
|
|
||||||
RREPLACES:${PN}-bcm43436 = "\
|
RREPLACES:${PN}-bcm43430 = "linux-firmware-bcm43430"
|
||||||
linux-firmware-bcm43436 \
|
RREPLACES:${PN}-bcm43436 = "linux-firmware-bcm43436"
|
||||||
linux-firmware-raspbian-bcm43436 \
|
RREPLACES:${PN}-bcm43436s = "linux-firmware-bcm43436s"
|
||||||
"
|
RREPLACES:${PN}-bcm43455 = "linux-firmware-bcm43455"
|
||||||
|
RREPLACES:${PN}-bcm43456 = "linux-firmware-bcm43456"
|
||||||
RCONFLICTS:${PN}-bcm43436s = "\
|
|
||||||
linux-firmware-bcm43436s \
|
|
||||||
linux-firmware-raspbian-bcm43436s \
|
|
||||||
"
|
|
||||||
|
|
||||||
RREPLACES:${PN}-bcm43436s = "\
|
|
||||||
linux-firmware-bcm43436s \
|
|
||||||
linux-firmware-raspbian-bcm43436s \
|
|
||||||
"
|
|
||||||
|
|
||||||
RCONFLICTS:${PN}-bcm43455 = "\
|
|
||||||
linux-firmware-bcm43455 \
|
|
||||||
linux-firmware-raspbian-bcm43455 \
|
|
||||||
"
|
|
||||||
RREPLACES:${PN}-bcm43455 = "\
|
|
||||||
linux-firmware-bcm43455 \
|
|
||||||
linux-firmware-raspbian-bcm43455 \
|
|
||||||
"
|
|
||||||
RCONFLICTS:${PN}-bcm43456 = "\
|
|
||||||
linux-firmware-bcm43456 \
|
|
||||||
linux-firmware-raspbian-bcm43456 \
|
|
||||||
"
|
|
||||||
RREPLACES:${PN}-bcm43456 = "\
|
|
||||||
linux-firmware-bcm43456 \
|
|
||||||
linux-firmware-raspbian-bcm43456 \
|
|
||||||
"
|
|
||||||
|
|
||||||
# Firmware files are generally not run on the CPU, so they can be
|
# Firmware files are generally not run on the CPU, so they can be
|
||||||
# allarch despite being architecture specific
|
# allarch despite being architecture specific
|
||||||
|
|
Loading…
Reference in New Issue
Block a user