[LEDE-DEV] [PATCH-v2 3/3] ath10k-firmware: Support CT IPQ4019 firmware.

Christian Lamparter chunkeey at gmail.com
Sun Jan 21 07:54:14 PST 2018


On Saturday, January 20, 2018 1:27:04 AM CET greearb at candelatech.com wrote:
> From: Ben Greear <greearb at candelatech.com>
> 
> Initial beta release of the CT IPQ4019 firmware.  Features are
> similar to the CT 9984 firmware
> 
> Signed-off-by: Ben Greear <greearb at candelatech.com>
> ---
>  package/firmware/ath10k-firmware/Makefile | 74 +++++++++++++++++++++++++++++--
>  1 file changed, 71 insertions(+), 3 deletions(-)
> 
> diff --git a/package/firmware/ath10k-firmware/Makefile b/package/firmware/ath10k-firmware/Makefile
> index 94e5953..c525d87 100644
> --- a/package/firmware/ath10k-firmware/Makefile
> +++ b/package/firmware/ath10k-firmware/Makefile
> @@ -50,6 +50,7 @@ $(Package/ath10k-firmware-default)
>  endef
>  
>  CT_FIRMWARE_FILE = $(1)-$($(1)_FIRMWARE_FILE_CT)
> +CT_FIRMWARE_FILE_HTT = $(1)-$($(1)_FIRMWARE_FILE_CT_HTT)
>  
>  define Download/ct-firmware
>    URL:=https://www.candelatech.com/downloads/$(2)
> @@ -57,6 +58,12 @@ define Download/ct-firmware
>    URL_FILE:=$($(1)_FIRMWARE_FILE_CT)
>  endef
>  
> +define Download/ct-firmware-htt
> +  URL:=https://www.candelatech.com/downloads/$(2)
> +  FILE:=$(call CT_FIRMWARE_FILE_HTT,$(1))
> +  URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT)
> +endef
> +
>  QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-19.bin.lede
>  define Download/ath10k-firmware-qca988x-ct
>    $(call Download/ct-firmware,QCA988X,)
> @@ -85,6 +92,20 @@ define Download/ath10k-firmware-qca9984-ct
>  endef
>  $(eval $(call Download,ath10k-firmware-qca9984-ct))
>  
> +QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-full-htt-mgt-community-10.bin-lede.002
> +define Download/ath10k-firmware-qca4019-ct-htt
> +  $(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4)
> +  HASH:=e67bbc8eba56bc72c1aa99a6304ea98345bddc34f4844d5d79a51db1d6d8c425
> +endef
> +$(eval $(call Download,ath10k-firmware-qca4019-ct-htt))
> +
> +QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-10.bin-lede.002
> +define Download/ath10k-firmware-qca4019-ct
> +  $(call Download/ct-firmware,QCA4019,ath10k-4019-10-4)
> +  HASH:=f1ebb73903e4e6a6209b8acdc623bc43d355d32cce838ce0448befe9196c7866
> +endef
> +$(eval $(call Download,ath10k-firmware-qca4019-ct))
> +
>  QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-9.bin-lede.004
>  define Download/ath10k-firmware-qca9888-ct
>    $(call Download/ct-firmware,QCA9888,ath10k-9888-10-4)
> @@ -146,6 +167,18 @@ This firmware conflicts with the standard 9984 firmware, so select only
>  one.
>  endef
>  
> +define Package/ath10k-firmware-qca4019-ct-htt/description
> +Alternative ath10k firmware for IPQ4019 radio from Candela Technologies.
> +Enables IBSS and other features.  Requires ath10k-ct driver to function.
> +See:  http://www.candelatech.com/ath10k-10.4.php
> +endef
> +
> +define Package/ath10k-firmware-qca4019-ct/description
> +Alternative ath10k firmware for IPQ4019 radio from Candela Technologies.
> +Enables IBSS and other features.  Works with standard or ath10k-ct driver.
> +See:  http://www.candelatech.com/ath10k-10.4.php
> +endef
> +
>  define Package/ath10k-firmware-qca9888-ct/description
>  Alternative ath10k firmware for QCA9886 and QCA9888 from Candela Technologies.
>  Enables IBSS and other features.  See:
> @@ -162,21 +195,34 @@ endef
>  
>  define Package/ath10k-firmware-qca99x0-ct
>  $(Package/ath10k-firmware-default)
> -  TITLE:=ath10k CT 10.4.3 firmware for QCA99x0 devices
> +  TITLE:=ath10k CT 10.4 firmware for QCA99x0 devices
>    SECTION:=firmware
>    CATEGORY:=Firmware
>  endef
>  
>  define Package/ath10k-firmware-qca9984-ct
>  $(Package/ath10k-firmware-default)
> -  TITLE:=ath10k CT 10.4.3 firmware for QCA9984 devices
> +  TITLE:=ath10k CT 10.4 firmware for QCA9984 devices
> +  SECTION:=firmware
> +  CATEGORY:=Firmware
> +endef
> +
> +define Package/ath10k-firmware-qca4019-ct-htt
> +$(Package/ath10k-firmware-default)
> +  TITLE:=ath10k CT 10.4 htt-mgt for QCA4018/9
> +  SECTION:=firmware
> +  CATEGORY:=Firmware
> +endef
> +define Package/ath10k-firmware-qca4019-ct
> +$(Package/ath10k-firmware-default)
> +  TITLE:=ath10k CT 10.4 firmware for QCA4018/9
>    SECTION:=firmware
>    CATEGORY:=Firmware
>  endef
>  
>  define Package/ath10k-firmware-qca9888-ct
>  $(Package/ath10k-firmware-default)
> -  TITLE:=ath10k CT 10.4.3 firmware for QCA9886 and QCA9888 devices
> +  TITLE:=ath10k CT 10.4 fw for QCA9886/8 devices
>    SECTION:=firmware
>    CATEGORY:=Firmware
>  endef
> @@ -328,6 +374,26 @@ define Package/ath10k-firmware-qca9984-ct/install
>  		$(1)/lib/firmware/ath10k/QCA9984/hw1.0/firmware-5.bin
>  endef
>  
> +define Package/ath10k-firmware-qca4019-ct-htt/install
> +	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
> +	$(INSTALL_DATA) \
> +		$(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
> +		$(1)/lib/firmware/ath10k/QCA4019/hw1.0/
> +	$(INSTALL_DATA) \
> +		$(DL_DIR)/$(call CT_FIRMWARE_FILE_HTT,QCA4019) \
> +		$(1)/lib/firmware/ath10k/QCA4019/hw1.0/ct-firmware-5.bin
> +endef
> +
> +define Package/ath10k-firmware-qca4019-ct/install
> +	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
> +	$(INSTALL_DATA) \
> +		$(PKG_BUILD_DIR)/QCA4019/hw1.0/board-2.bin \
> +		$(1)/lib/firmware/ath10k/QCA4019/hw1.0/
> +	$(INSTALL_DATA) \
> +		$(DL_DIR)/$(call CT_FIRMWARE_FILE,QCA4019) \
> +		$(1)/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
> +endef
> +
>  define Package/ath10k-firmware-qca9888-ct/install
>  	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA9888/hw2.0
>  	ln -s \
> @@ -353,4 +419,6 @@ $(eval $(call BuPackage/ath10k-firmware-defaultildPackage,ath10k-firmware-qca9887-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca988x-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca99x0-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca9984-ct))
> +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct-htt))
> +$(eval $(call BuildPackage,ath10k-firmware-qca4019-ct))
>  $(eval $(call BuildPackage,ath10k-firmware-qca9888-ct))
> 
---
I applied the full series on top of the r5904 (see attached
diffconfig). But I ran into issues when selecting ath10k-ct
and ath10k-firmware-qca4019-ct during image creation.
So what's the recommended way to install these?

Furthermore, it looks like the packages are lacking CONFLICTS
flags. Like between ath10k-firmware-qca4019-ct-htt and 
ath10k-firmware-qca4019-ct. Again the conflict between the
ct-htt and -ct  firmware is not because of the firmware itself
(they have different names "firmware-5.bin" vs "ct-firmware-5.bin")
but because of the "board-2.bin". Upon further investigation, the
board-2.bin actually comes from the ath10k github, so it's the
same as ath10k-firmware-qca4019. So, is it really necessary to
have the same blob in two packages?
---
Collected errors:
 * check_data_file_clashes: Package kmod-ath10k wants to install file /mnt/build/lede/ath10k-ct-test/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/lib/modules/4.9.76/ath10k_core.ko
        But that file is already provided by package  * kmod-ath10k-ct
 * check_data_file_clashes: Package kmod-ath10k wants to install file /mnt/build/lede/ath10k-ct-test/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/lib/modules/4.9.76/ath10k_pci.ko
        But that file is already provided by package  * kmod-ath10k-ct
 * opkg_install_cmd: Cannot install package kmod-ath10k.
 * check_data_file_clashes: Package ath10k-firmware-qca4019-ct wants to install file /mnt/build/lede/ath10k-ct-test/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin
        But that file is already provided by package  * ath10k-firmware-qca4019
 * check_data_file_clashes: Package ath10k-firmware-qca4019-ct wants to install file /mnt/build/lede/ath10k-ct-test/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/root-ipq806x/lib/firmware/ath10k/QCA4019/hw1.0/firmware-5.bin
        But that file is already provided by package  * ath10k-firmware-qca4019
 * opkg_install_cmd: Cannot install package ath10k-firmware-qca4019-ct.
make[2]: *** [package/Makefile:67: package/install] Error 255
make[2]: Leaving directory '/mnt/build/lede/ath10k-ct-test'
make[1]: *** [package/Makefile:103: /mnt/build/lede/ath10k-ct-test/staging_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/stamp/.package_install] Error 2
make[1]: Leaving directory '/mnt/build/lede/ath10k-ct-test'
make: *** [/mnt/build/lede/ath10k-ct-test/include/toplevel.mk:218: world] Error 2

---  diffconfig.sh 
CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
CONFIG_TARGET_DEVICE_ipq806x_DEVICE_avm_fritzbox-4040=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_DEVICE_avm_fritzbox-4040=""
CONFIG_TARGET_DEVICE_ipq806x_DEVICE_openmesh_a42=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_DEVICE_openmesh_a42=""
CONFIG_TARGET_DEVICE_ipq806x_DEVICE_qcom_ap-dk01.1-c1=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_DEVICE_qcom_ap-dk01.1-c1=""
CONFIG_TARGET_DEVICE_ipq806x_DEVICE_qcom_ap-dk04.1-c1=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_DEVICE_qcom_ap-dk04.1-c1=""
CONFIG_TARGET_PER_DEVICE_ROOTFS=y
CONFIG_PACKAGE_ath10k-firmware-qca4019=y
CONFIG_PACKAGE_ath10k-firmware-qca4019-ct=y
CONFIG_PACKAGE_ipq-wifi-openmesh_a42=y
CONFIG_PACKAGE_kmod-ath10k-ct=y
CONFIG_PACKAGE_kmod-hwmon-core=y
---
sha1sum .pkgdir/ath10k-firmware-qca4019-ct/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin \
        .pkgdir/ath10k-firmware-qca4019/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin
aacc603506832ec81552e1b8f2155f9dc12c12d0  .pkgdir/ath10k-firmware-qca4019-ct/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin
aacc603506832ec81552e1b8f2155f9dc12c12d0  .pkgdir/ath10k-firmware-qca4019/lib/firmware/ath10k/QCA4019/hw1.0/board-2.bin





More information about the Lede-dev mailing list