meta-digi-arm: split ath6kl firmware from kernel module
Split the ATH6KL firmware files to a different recipe and package so they can be used regardless of what driver we are using (the external module or the upstream driver). Reuse the 'firmware-atheros' recipe which was creating a package with bluetooth firmware, to create the package with wireless firmware as well. Also remove 'ccimx6' as compatible machine for the external atheros module, as the module does not even compile with the kernel version we are using (3.14). https://jira.digi.com/browse/DEL-1858 Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
parent
afd194568f
commit
7d126d318b
|
|
@ -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}"
|
||||
|
|
|
|||
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -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)"
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -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)"
|
||||
|
|
|
|||
|
|
@ -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),)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in New Issue