diff --git a/meta-digi-arm/conf/machine/include/ccardimx28.inc b/meta-digi-arm/conf/machine/include/ccardimx28.inc index 23bc73417..781f59b71 100644 --- a/meta-digi-arm/conf/machine/include/ccardimx28.inc +++ b/meta-digi-arm/conf/machine/include/ccardimx28.inc @@ -23,6 +23,7 @@ WIRELESS_MODULE_append = "${@base_contains('MACHINE_FEATURES', 'wifi', 'kernel-m # Firmware MACHINE_FIRMWARE ?= "" MACHINE_FIRMWARE_append = " ${@base_conditional('HAVE_BT', '1' , 'firmware-atheros-ar3k', '', d)}" +MACHINE_FIRMWARE_append = " ${@base_conditional('HAVE_WIFI', '1' , 'firmware-atheros-ath6kl', '', d)}" MACHINE_EXTRA_RDEPENDS += "mtd-utils-ubifs nvram ubootenv update-flash" MACHINE_EXTRA_RRECOMMENDS += "${MACHINE_FIRMWARE} ${WIRELESS_MODULE}" diff --git a/meta-digi-arm/conf/machine/include/ccimx6.inc b/meta-digi-arm/conf/machine/include/ccimx6.inc index 2274719e2..68771793e 100644 --- a/meta-digi-arm/conf/machine/include/ccimx6.inc +++ b/meta-digi-arm/conf/machine/include/ccimx6.inc @@ -24,6 +24,7 @@ MACHINE_FIRMWARE ?= "" MACHINE_FIRMWARE_append_mx6q = " firmware-imx-vpu-imx6q" MACHINE_FIRMWARE_append_mx6dl = " firmware-imx-vpu-imx6d" MACHINE_FIRMWARE_append = " ${@base_conditional('HAVE_BT', '1' , 'firmware-atheros-ar3k', '', d)}" +MACHINE_FIRMWARE_append = " ${@base_conditional('HAVE_WIFI', '1' , 'firmware-atheros-ath6kl', '', d)}" MACHINE_EXTRA_RDEPENDS += " \ e2fsprogs-mke2fs \ diff --git a/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros.bb b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros.bb index f279fca7d..b9311c6cb 100644 --- a/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros.bb +++ b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros.bb @@ -5,24 +5,81 @@ SECTION = "base" LICENSE = "Proprietary" LIC_FILES_CHKSUM = "file://${DIGI_EULA_FILE};md5=4c0991cfde5c8a92338cbfe0f4f9a5c6" -SRC_URI = " \ +FW_ATH6KL = " \ + file://athtcmd_ram.bin \ + file://athwlan.bin \ + file://Digi_6203-6233-US.bin \ + file://Digi_6203-6233-World.bin \ + file://fw-4.bin \ + file://nullTestFlow.bin \ + file://utf.bin \ +" + +FW_ATH6KL_append_ccimx6 = " \ + file://Digi_6203_2_ANT-US.bin \ + file://Digi_6203_2_ANT-World.bin \ +" + +FW_AR3K = " \ file://PS_ASIC_class_1.pst \ file://PS_ASIC_class_2.pst \ file://RamPatch.txt \ file://readme.txt \ " +SRC_URI = " \ + ${FW_AR3K} \ + ${FW_ATH6KL} \ +" + S = "${WORKDIR}" do_install() { + # AR3K bluetooth firmware install -d ${D}${base_libdir}/firmware/ar3k/1020200 - install -m 0644 PS_ASIC_class_1.pst PS_ASIC_class_2.pst RamPatch.txt readme.txt \ + install -m 0644 \ + PS_ASIC_class_1.pst \ + PS_ASIC_class_2.pst \ + RamPatch.txt \ + readme.txt \ ${D}${base_libdir}/firmware/ar3k/1020200/ + + # ATH6KL wireless firmware + install -d ${D}${base_libdir}/firmware/ath6k/AR6003/hw2.1.1 + install -m 0644 \ + athtcmd_ram.bin \ + athwlan.bin \ + Digi_6203-6233-US.bin \ + Digi_6203-6233-World.bin \ + fw-4.bin \ + nullTestFlow.bin \ + utf.bin \ + ${D}${base_libdir}/firmware/ath6k/AR6003/hw2.1.1/ + # Wireless certification + # 0x0 = US + # 0x1 = International + # 0x2 = Japan + ln -sf /proc/device-tree/wireless/mac-address ${D}${base_libdir}/firmware/ath6k/AR6003/hw2.1.1/softmac + ln -sf Digi_6203-6233-US.bin ${D}${base_libdir}/firmware/ath6k/AR6003/hw2.1.1/bdata.0x0.bin + ln -sf Digi_6203-6233-World.bin ${D}${base_libdir}/firmware/ath6k/AR6003/hw2.1.1/bdata.0x1.bin + ln -sf Digi_6203-6233-World.bin ${D}${base_libdir}/firmware/ath6k/AR6003/hw2.1.1/bdata.0x2.bin +} + +do_install_append_ccimx6() { + install -m 0644 \ + Digi_6203_2_ANT-US.bin \ + Digi_6203_2_ANT-World.bin \ + ${D}${base_libdir}/firmware/ath6k/AR6003/hw2.1.1/ + ln -sf Digi_6203_2_ANT-US.bin ${D}${base_libdir}/firmware/ath6k/AR6003/hw2.1.1/bdata.ANT-0x0.bin + ln -sf Digi_6203_2_ANT-World.bin ${D}${base_libdir}/firmware/ath6k/AR6003/hw2.1.1/bdata.ANT-0x1.bin + ln -sf Digi_6203_2_ANT-World.bin ${D}${base_libdir}/firmware/ath6k/AR6003/hw2.1.1/bdata.ANT-0x2.bin } # Do not create empty debug and development packages (PN-dbg PN-dev PN-staticdev) -PACKAGES = "${PN}-ar3k" +PACKAGES = "${PN}-ar3k ${PN}-ath6kl" FILES_${PN}-ar3k = "/lib/firmware/ar3k" +FILES_${PN}-ath6kl = "/lib/firmware/ath6k" -COMPATIBLE_MACHINE = "(mxs|mx6)" +PACKAGE_ARCH = "${MACHINE_ARCH}" +COMPATIBLE_MACHINE = "(ccardimx28|ccimx6)" diff --git a/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/Digi_6203-6233-World.bin b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/Digi_6203-6233-World.bin new file mode 100644 index 000000000..80315f733 Binary files /dev/null and b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/Digi_6203-6233-World.bin differ diff --git a/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/athtcmd_ram.bin b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/athtcmd_ram.bin new file mode 100644 index 000000000..3f10fcdea Binary files /dev/null and b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/athtcmd_ram.bin differ diff --git a/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/athwlan.bin b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/athwlan.bin new file mode 100644 index 000000000..920971c9c Binary files /dev/null and b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/athwlan.bin differ diff --git a/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/ccardimx28/Digi_6203-6233-US.bin b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/ccardimx28/Digi_6203-6233-US.bin new file mode 100644 index 000000000..74e7f50fe Binary files /dev/null and b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/ccardimx28/Digi_6203-6233-US.bin differ diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203-6233-US.bin b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/ccimx6/Digi_6203-6233-US.bin similarity index 100% rename from meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203-6233-US.bin rename to meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/ccimx6/Digi_6203-6233-US.bin diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203_2_ANT-US.bin b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/ccimx6/Digi_6203_2_ANT-US.bin similarity index 100% rename from meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203_2_ANT-US.bin rename to meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/ccimx6/Digi_6203_2_ANT-US.bin diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203_2_ANT-World.bin b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/ccimx6/Digi_6203_2_ANT-World.bin similarity index 100% rename from meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/Digi_6203_2_ANT-World.bin rename to meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/ccimx6/Digi_6203_2_ANT-World.bin diff --git a/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/fw-4.bin b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/fw-4.bin new file mode 100644 index 000000000..35ebeff32 Binary files /dev/null and b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/fw-4.bin differ diff --git a/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/nullTestFlow.bin b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/nullTestFlow.bin new file mode 100644 index 000000000..194183cf6 Binary files /dev/null and b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/nullTestFlow.bin differ diff --git a/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/utf.bin b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/utf.bin new file mode 100644 index 000000000..c03cfdc7c Binary files /dev/null and b/meta-digi-arm/recipes-bsp/firmware-atheros/firmware-atheros/utf.bin differ diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb index ff3148e26..b81036507 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb +++ b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros.bb @@ -6,10 +6,6 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/ISC;md5=f3b90e78ea0cffb20bf5cca inherit module -# 'modprobe' from kmod package is needed to load atheros driver. The one -# from busybox does not support '--ignore-install' option. -RDEPENDS_${PN} = "kmod" - SRCREV_external = "" SRCREV_internal = "50dafb5890180cf33fdb42919c3e6f591d0cd2ea" SRCREV = "${@base_conditional('DIGI_INTERNAL_GIT', '1' , '${SRCREV_internal}', '${SRCREV_external}', d)}" @@ -24,14 +20,6 @@ SRC_URI += " \ file://0002-atheros-update-renamed-struct-members.patch \ " -# MX6 wireless calibration file and post-down script -SRC_URI_append_ccimx6 = " \ - file://Digi_6203_2_ANT-US.bin \ - file://Digi_6203_2_ANT-World.bin \ - file://Digi_6203-6233-US.bin \ - file://atheros-post-down \ -" - S = "${WORKDIR}/git" EXTRA_OEMAKE += "DEL_PLATFORM=${MACHINE} KLIB_BUILD=${STAGING_KERNEL_DIR}" @@ -50,20 +38,13 @@ do_install_append() { _EOF_ } -do_install_append_ccimx6() { - install -d ${D}${sysconfdir}/network/if-post-down.d - install -m 0755 ${WORKDIR}/atheros-post-down ${D}${sysconfdir}/network/if-post-down.d/atheros - install -m 0644 \ - ${WORKDIR}/Digi_6203_2_ANT-US.bin \ - ${WORKDIR}/Digi_6203_2_ANT-World.bin \ - ${WORKDIR}/Digi_6203-6233-US.bin \ - ${D}/lib/firmware/ath6k/AR6003/hw2.1.1/ -} - FILES_${PN} += " \ - ${base_libdir}/firmware/ \ ${sysconfdir}/modprobe.d/ \ ${sysconfdir}/network/ \ " -COMPATIBLE_MACHINE = "(ccardimx28|ccimx6)" +# 'modprobe' from kmod package is needed to load atheros driver. The one +# from busybox does not support '--ignore-install' option. +RDEPENDS_${PN} = "kmod" + +COMPATIBLE_MACHINE = "(ccardimx28)" diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/Makefile b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/Makefile index f246c6dd8..260054a7a 100644 --- a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/Makefile +++ b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/Makefile @@ -1,5 +1,4 @@ ATH_DRV_BASEDIR := compat-wireless -ATH_FIR_BASEDIR := Firmware_Package/target/AR6003/hw2.1.1 ifneq ($(KERNELRELEASE),) @@ -28,15 +27,6 @@ obj-y += $(ATH_DRV_BASEDIR)/drivers/net/wireless/ath/ath6kl/ else #ifneq ($(KERNELRELEASE),) -## Firmware files -FIRMWARE := $(ATH_FIR_BASEDIR)/fw_tablet_dongle/athtcmd_ram.bin -FIRMWARE += $(ATH_FIR_BASEDIR)/fw_tablet_dongle/athwlan.bin -FIRMWARE += $(ATH_FIR_BASEDIR)/fw_tablet_dongle/fw-4.bin -FIRMWARE += $(ATH_FIR_BASEDIR)/fw_tablet_dongle/nullTestFlow.bin -FIRMWARE += $(ATH_FIR_BASEDIR)/fw_tablet_dongle/utf.bin -FIRMWARE += $(ATH_FIR_BASEDIR)/Digi_6203-6233-US.bin -FIRMWARE += $(ATH_FIR_BASEDIR)/Digi_6203-6233-World.bin - SRC := $(shell pwd) all: @@ -48,8 +38,5 @@ modules_install: find $(INSTALL_MOD_PATH)/lib/modules/$(KERNEL_VERSION)/extra/$(ATH_DRV_BASEDIR) -type f -name '*.ko' | \ xargs -I modfile mv -f modfile $(INSTALL_MOD_PATH)/lib/modules/$(KERNEL_VERSION)/extra/ rm -rf $(INSTALL_MOD_PATH)/lib/modules/*/extra/$(ATH_DRV_BASEDIR) - # Install firmware - mkdir -p $(INSTALL_MOD_PATH)/lib/firmware/ath6k/AR6003/hw2.1.1/ - install -m 0644 $(FIRMWARE) $(INSTALL_MOD_PATH)/lib/firmware/ath6k/AR6003/hw2.1.1/ endif #ifneq ($(KERNELRELEASE),) diff --git a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/atheros-post-down b/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/atheros-post-down deleted file mode 100644 index 97a776550..000000000 --- a/meta-digi-arm/recipes-kernel/kernel-module-atheros/kernel-module-atheros/ccimx6/atheros-post-down +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -#=============================================================================== -# -# atheros-post-down -# -# Copyright (C) 2014 by Digi International Inc. -# All rights reserved. -# -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published by -# the Free Software Foundation. -# -# -# !Description: Unload Atheros' wireless driver -# -#=============================================================================== - -set -e - -[ "${IFACE}" != "wlan0" ] && exit 0 - -if grep -qs ath6kl_sdio /proc/modules; then - rmmod ath6kl_sdio > /dev/null -fi