buildroot/package/rpi-wifi-firmware/rpi-wifi-firmware.mk
Peter Korsgaard 5634f40284 rpi-wifi-firmware: new package
Add firmware (NVRAM data) for the Raspberry Pi 3 and Zero W wifi module.

Notice that linux-firmware provides the main firmware
(brcmfmac43430-sdio.bin), but the module also needs board specific
configuration (NVRAM) data.

For the rpi, this data is available in the RPI firmware-nonfree git repo.
As this repo contains a lot of unrelated data (~70MB), simply download the
single NVRAM file instead of cloning the entire repo.

A similar approach is used by openwrt and opensuse:

https://dev.openwrt.org/browser/trunk/package/firmware/brcmfmac43430-firmware/Makefile?rev=49139
https://build.opensuse.org/package/view_file/hardware/bcm43xx-firmware/bcm43xx-firmware.spec?rev=b1628448b36c85abc9215eab4785ef29

[Peter: add _FIRMWARE_LICENSE as suggested by Yann]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-05-06 11:31:43 +02:00

24 lines
857 B
Makefile

################################################################################
#
# rpi-wifi-firmware
#
################################################################################
RPI_WIFI_FIRMWARE_VERSION = 54bab3d6a6d43239c71d26464e6e10e5067ffea7
# brcmfmac43430-sdio.bin comes from linux-firmware
RPI_WIFI_FIRMWARE_SOURCE = brcmfmac43430-sdio.txt
# git repo contains a lot of unrelated files
RPI_WIFI_FIRMWARE_SITE = https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/$(RPI_WIFI_FIRMWARE_VERSION)/brcm80211/brcm
RPI_WIFI_FIRMWARE_LICENSE = PROPRIETARY
define RPI_WIFI_FIRMWARE_EXTRACT_CMDS
cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/
endef
define RPI_WIFI_FIRMWARE_INSTALL_TARGET_CMDS
$(INSTALL) -D -m 0644 $(@D)/$(RPI_WIFI_FIRMWARE_SOURCE) \
$(TARGET_DIR)/lib/firmware/brcm/$(RPI_WIFI_FIRMWARE_SOURCE)
endef
$(eval $(generic-package))