Skip to content

Commit

Permalink
package/linux-firmware-qca9377: add temporary package
Browse files Browse the repository at this point in the history
This exists to provide Silex BT firmware through linux-firmware
until a supporting commit is merged in upstream Buildroot and
makes it in to a release.

Signed-off-by: Kris Bahnsen <[email protected]>
  • Loading branch information
ts-kris committed May 11, 2023
1 parent 162c153 commit 9159832
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 0 deletions.
4 changes: 4 additions & 0 deletions technologic/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ menu "Bootloader Binaries"
source "$BR2_EXTERNAL_TECHNOLOGIC_PATH/package/ts7670-uboot/Config.in"
source "$BR2_EXTERNAL_TECHNOLOGIC_PATH/package/ts7400v2-uboot/Config.in"
endmenu

menu "Temporary Config Options"
source "$BR2_EXTERNAL_TECHNOLOGIC_PATH/package/linux-firmware-qca9377/Config.in"
endmenu
25 changes: 25 additions & 0 deletions technologic/package/linux-firmware-qca9377/Config.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
config BR2_PACKAGE_LINUX_FIRMWARE_QCA9377
bool "linux-firmware-qca9377"
help
This is a transition package to support BT on the Silex
Wi-Fi / BT module on embeddedTS platforms. Support for
installing this firmware normally has been proposed upstream,
but this is added here until that makes it in to a release.

This package provides various binary firmware files (closed
binary blobs) for such devices like LAN, WLAN cards etc.

https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git

if BR2_PACKAGE_LINUX_FIRMWARE_QCA9377

menu "Bluetooth firmware"

config BR2_PACKAGE_LINUX_FIRMWARE_QUALCOMM_9377_BT
bool "Qualcomm Atheros QCA9377 Bluetooth"
help
Firmware files for QCA9377 bluetooth support.

endmenu # Bluetooth

endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# From https://mirrors.edge.kernel.org/pub/linux/kernel/firmware/sha256sums.asc
sha256 e793783e92acbde549965521462d1d1327827360664cf242dbda08f075654331 linux-firmware-20221214.tar.xz

# Hash for license files
sha256 8116433f4004fc0c24d72b3d9e497808b724aa0e5e1cd63fc1bf66b715b1e2e9 LICENCE.Abilis
sha256 a6c0ec4338bc89480da52812bea7f9e4b52bc7118e3e352141f99d779c397c53 LICENSE.amdgpu
sha256 2d6062d63b91eb750bf741498691604f75184b9fee97608ec537cd09bd6a42b4 LICENCE.Marvell
sha256 802b7014b26c606cf6248ae8b0ab1ce6d2d1b0db236d38dd269e676cd70710f2 LICENCE.atheros_firmware
sha256 3b5eb392b2d9d8c46d6aae26d06c187e5ea3029b12d13bc2b8deb8b3ce6bfa53 ath10k/QCA6174/hw3.0/notice_ath10k_firmware-4.txt
sha256 631065703055d11b099477c508508f20a80b202aad548a7726564bfa59a96c91 ath10k/QCA6174/hw2.1/notice_ath10k_firmware-5.txt
sha256 8ce5c6ea0542bf4aac31fc3ae16a39792ad22d0eae4543063fac56fb3380f021 ath10k/QCA6174/hw3.0/notice_ath10k_firmware-6.txt
sha256 b16056fc91b82a0e3e8de8f86c2dac98201aa9dc3cbd33e8d38f1b087fcec30d LICENCE.broadcom_bcm43xx
sha256 a5777f9e80aca0603b0648454de996168b1c530322550ccda94d6d78bcf6c061 LICENCE.chelsio_firmware
sha256 ae0db6cc4db33941148df0f67de53e76a77b1b5a46b3165edb7040aa2750015f LICENCE.cypress
sha256 60fbc9cccb455e1a3306c97db942d6f24fa93664be61d54c497637e6d0e2ae83 LICENCE.fw_sst_0f28
sha256 5181b0b51efc79d5acb2c9bb92042878fdbad97a92114d4ab5e32e2b5b52fce4 LICENCE.ibt_firmware
sha256 8c45a83562a69f7ac4207e4cb5c0063af2e545791b3947bc81dc82305481c15c LICENSE.ice_enhanced
sha256 0e0c11073ba3c832097da38e0905da36b8a3526f219407977b13b71c6675be7d LICENCE.it913x
sha256 16d5040c7cf851fc693b7542e20870935b99802533ea1bfd231c377a2305e5c5 LICENCE.iwlwifi_firmware
sha256 0fc67bd715b3395f3f2af464781910e9e69c4ba23da304352229b42dc9e986c3 LICENCE.microchip
sha256 59ae206c89108905ebdc9ad4c9336526bd2c0d50fbf988c21e8c2a82719d42a4 LICENCE.moxa
sha256 2051d5bf0755a0668f8c3d9a0d1c41d4b8cc411aba70f720fda71ae9e3b4d25c LICENCE.qat_firmware
sha256 4071a11d878dbc0ac6d9e71203d03b151638f9d7a8bc47a54c3cb964100d5822 LICENCE.qla2xxx
sha256 d7bec70668ddd4aae8fb4aa32870e54b49fcdb0b9b007aa9f54b53a1ac7461bd LICENCE.ralink-firmware.txt
sha256 8568352b57f3574f9d5b2753cdb7c6e5eb2b79e82fbb9c9ba6566947467ef508 LICENCE.ralink_a_mediatek_company_firmware
sha256 a61351665b4f264f6c631364f85b907d8f8f41f8b369533ef4021765f9f3b62e LICENCE.rtlwifi_firmware.txt
sha256 106bef96470001e877fcf7ba0337fa6766a317650eb47fcaeb743eeebd62c4ff LICENCE.ti-connectivity
sha256 8ea9f4aee5f53ad877041ff089e8c95d34d615ce19a3111e5e1ea70d990ed7ff LICENCE.xc4000
sha256 30ec8a66503dc73f83937564ae70ca23aa03259e64727ff4195b5b6f695e782f LICENCE.xc5000
sha256 f8822049f32fef2e90a197bd8cf259f476db75d549456bdca8567616a9c07ace LICENCE.xc5000c
sha256 a064cbf83e10d72579d236a1e36032681adb8e442943ff75b57020a82992a5ed LICENSE.QualcommAtheros_ar3k
sha256 337a55102138d7baa143ee4a4c6c91693e0113fece35d380b2a12109e8c23b3f LICENSE.QualcommAtheros_ath10k
sha256 630fd46c95d3ac6544590c2265ba7348fbc930fb386261a1c04dcd9f403645b8 LICENSE.dib0700
sha256 8542aeabf2761935122d693561e16766ce1bcc2b0d003204f9040b7d6d929f2e LICENSE.i915
sha256 be904cd28cb292b80cdb6cf412ab0d9159d431671e987ad433c1f62e0988a9bc LICENSE.qcom
sha256 fc6223d4bfe9f2f9e2eddc44b9fe5721d0caf49f01cb08d602906add686d8c6f LICENSE.radeon
sha256 2bdd2e716f05d9737d3f9a20f9a3a3c0caee0e866100ddb0673f1178e42f92b9 LICENSE.sdma_firmware
sha256 744babd4eae138ccfb5bd343b1589912b9839274f8a794af0b6c9b451df73579 WHENCE
sha256 fa43e1b9a13b341a07adca9dbe73d0f9072d7966fdfe811c01f0dd2872d7309a qcom/NOTICE.txt
sha256 bef9c828e84f21e7835b4de7daf954a327e1ff777871b58e116039b684c0d604 LICENCE.e100
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
################################################################################
#
# linux-firmware-qca9377
#
################################################################################

LINUX_FIRMWARE_QCA9377_VERSION = 20221214
LINUX_FIRMWARE_QCA9377_SOURCE = linux-firmware-$(LINUX_FIRMWARE_QCA9377_VERSION).tar.xz
LINUX_FIRMWARE_QCA9377_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/firmware
LINUX_FIRMWARE_QCA9377_INSTALL_IMAGES = YES

LINUX_FIRMWARE_QCA9377_CPE_ID_VENDOR = kernel

# Qualcomm Atheros QCA9377 Bluetooth
ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_QUALCOMM_9377_BT),y)
LINUX_FIRMWARE_QCA9377_FILES += qca/rampatch_00230302.bin qca/nvm_00230302.bin
LINUX_FIRMWARE_QCA9377_ALL_LICENSE_FILES += LICENSE.qcom
endif

ifneq ($(LINUX_FIRMWARE_QCA9377_FILES)$(LINUX_FIRMWARE_QCA9377_DIRS),)

define LINUX_FIRMWARE_QCA9377_BUILD_CMDS
cd $(@D) && \
$(TAR) cf br-firmware.tar $(sort $(LINUX_FIRMWARE_QCA9377_FILES) $(LINUX_FIRMWARE_QCA9377_DIRS))
endef

# Most firmware files are under a proprietary license, so no need to
# repeat it for every selections above. Those firmwares that have more
# lax licensing terms may still add them on a per-case basis.
LINUX_FIRMWARE_QCA9377_LICENSE += Proprietary

# This file contains some licensing information about all the firmware
# files found in the linux-firmware package, so we always add it, even
# for firmwares that have their own licensing terms.
LINUX_FIRMWARE_QCA9377_ALL_LICENSE_FILES += WHENCE

# Some license files may be listed more than once, so we have to remove
# duplicates
LINUX_FIRMWARE_QCA9377_LICENSE_FILES = $(sort $(LINUX_FIRMWARE_QCA9377_ALL_LICENSE_FILES))

# Some firmware are distributed as a symlink, for drivers to load them using a
# defined name other than the real one. Since 9cfefbd7fbda ("Remove duplicate
# symlinks") those symlink aren't distributed in linux-firmware but are created
# automatically by its copy-firmware.sh script during the installation, which
# parses the WHENCE file where symlinks are described. We follow the same logic
# here, adding symlink only for firmwares installed in the target directory.
#
# For testing the presence of firmwares in the target directory we first make
# sure we canonicalize the pointed-to file, to cover the symlinks of the form
# a/foo -> ../b/foo where a/ (the directory where to put the symlink) does
# not yet exist.
define LINUX_FIRMWARE_QCA9377_INSTALL_FW
mkdir -p $(1)
$(TAR) xf $(@D)/br-firmware.tar -C $(1)
cd $(1) ; \
sed -r -e '/^Link: (.+) -> (.+)$$/!d; s//\1 \2/' $(@D)/WHENCE | \
while read f d; do \
if test -f $$(readlink -m $$(dirname "$$f")/$$d); then \
mkdir -p $$(dirname "$$f") || exit 1; \
ln -sf $$d "$$f" || exit 1; \
fi ; \
done
endef

endif # LINUX_FIRMWARE_QCA9377_FILES || LINUX_FIRMWARE_QCA9377_DIRS

define LINUX_FIRMWARE_QCA9377_INSTALL_TARGET_CMDS
$(call LINUX_FIRMWARE_QCA9377_INSTALL_FW, $(TARGET_DIR)/lib/firmware)
endef

define LINUX_FIRMWARE_QCA9377_INSTALL_IMAGES_CMDS
$(call LINUX_FIRMWARE_QCA9377_INSTALL_FW, $(BINARIES_DIR))
endef

$(eval $(generic-package))

0 comments on commit 9159832

Please sign in to comment.