Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux-firmware: make rpi fw specific to rpi
Currently, we are installing the rpi custom txt and fw files whenever the meta-raspberrypi layer is included in bblayers.conf. This breaks other machines that need to use the bcm43430 drivers but with alternate txt or fw files. Install these files only when "rpi" is in MACHINEOVERRIDES. Signed-off-by: Martin Kelly <mkelly@xevo.com>
- Loading branch information
Showing
1 changed file
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | ||
FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/files:" | ||
|
||
SRC_URI += " \ | ||
file://brcmfmac43430-sdio.bin \ | ||
file://brcmfmac43430-sdio.txt \ | ||
" | ||
SRC_URI_append_rpi = " \ | ||
file://brcmfmac43430-sdio.bin \ | ||
file://brcmfmac43430-sdio.txt \ | ||
" | ||
|
||
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}${nonarch_base_libdir}/firmware/brcm/$_firmware | awk '{print $1}')" != "$_oldmd5" ]; then | ||
_firmware="" | ||
bbwarn "linux-firmware stopped providing brcmfmac43430 v7.45.41.26." | ||
else | ||
_firmware="${WORKDIR}/$_firmware" | ||
fi | ||
do_install_append_rpi() { | ||
# 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}${nonarch_base_libdir}/firmware/brcm/$_firmware | awk '{print $1}')" != "$_oldmd5" ]; then | ||
_firmware="" | ||
bbwarn "linux-firmware stopped providing brcmfmac43430 v7.45.41.26." | ||
else | ||
_firmware="${WORKDIR}/$_firmware" | ||
fi | ||
|
||
mkdir -p ${D}/${nonarch_base_libdir}/firmware/brcm | ||
install -m 0644 $_firmware ${WORKDIR}/brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm | ||
mkdir -p ${D}/${nonarch_base_libdir}/firmware/brcm | ||
install -m 0644 $_firmware ${WORKDIR}/brcmfmac43430-sdio.txt ${D}${nonarch_base_libdir}/firmware/brcm | ||
} | ||
|
||
FILES_${PN}-bcm43430 += " \ | ||
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt \ | ||
FILES_${PN}-bcm43430_rpi += " \ | ||
${nonarch_base_libdir}/firmware/brcm/brcmfmac43430-sdio.txt \ | ||
" |