meta-digi: fix atheros recipes for new linux version

With the old version of the kernel (2.6.35) we build an external atheros
kernel module, while with the new kernel (3.10) the atheros driver is
included with the kernel sources.

However, the new driver needs the firmware files and the driver load
scripts that are stored with the old driver.

So put a dependence on kernel-module-atheros regardless of the kernel
version and then rework the kernel-module-atheros recipe to build the
whole driver for the old kernel or only the firmware for the new kernel.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2013-08-07 16:40:12 +02:00
parent 5cce293895
commit 0f0a76a6f4
3 changed files with 13 additions and 9 deletions

View File

@ -27,7 +27,9 @@ SRC_URI += " \
S = "${WORKDIR}/git"
EXTRA_OEMAKE = "DEL_PLATFORM=${MACHINE} KLIB_BUILD=${STAGING_KERNEL_DIR}"
ATH_ONLY_INSTALL_FW = "${@base_version_less_or_equal('PREFERRED_VERSION_linux-dey', '2.6.35.14', '', '1', d)}"
EXTRA_OEMAKE = "DEL_PLATFORM=${MACHINE} KLIB_BUILD=${STAGING_KERNEL_DIR} ATH_ONLY_INSTALL_FW=${ATH_ONLY_INSTALL_FW}"
do_configure_prepend() {
cp ${WORKDIR}/Makefile ${S}/

View File

@ -44,14 +44,18 @@ endif
SRC := $(shell pwd)
all:
ifeq ($(ATH_ONLY_INSTALL_FW),)
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
endif
modules_install:
ifeq ($(ATH_ONLY_INSTALL_FW),)
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
# Fix installation directory of the modules.
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)
endif
# 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/

View File

@ -12,15 +12,13 @@ inherit packagegroup
WIRELESS_MODULE ?= ""
WIRELESS_MODULE_append_mx5 = "${@base_contains('MACHINE_FEATURES', 'wifi', 'kernel-module-redpine', '', d)}"
ATHEROS_WIRELESS_MODULE = '${@base_version_less_or_equal("PREFERRED_VERSION_linux-dey", "2.6.35.14", "kernel-module-atheros", "", d)}'
WIRELESS_MODULE_append_mxs = "${@base_contains('MACHINE_FEATURES', 'wifi', '${ATHEROS_WIRELESS_MODULE}', '', d)}"
WIRELESS_MODULE_append_mxs = "${@base_contains('MACHINE_FEATURES', 'wifi', 'kernel-module-atheros', '', d)}"
RDEPENDS_${PN} = "\
wpa-supplicant \
wireless-tools \
crda \
${WIRELESS_MODULE} \
crda \
wireless-tools \
wpa-supplicant \
${WIRELESS_MODULE} \
"
RDEPENDS_${PN}_append_mx5 = "${WIRELESS_MODULE}"
RDEPENDS_${PN}_append_mxs = " iw ${WIRELESS_MODULE}"
RDEPENDS_${PN}_append_mxs = " iw"