From 0f0a76a6f433732597dd6956c4580c29bc1973cd Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 7 Aug 2013 16:40:12 +0200 Subject: [PATCH] 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 --- .../kernel-module-atheros/kernel-module-atheros.bb | 4 +++- .../kernel-module-atheros/Makefile | 4 ++++ .../packagegroups/packagegroup-dey-wireless.bb | 14 ++++++-------- 3 files changed, 13 insertions(+), 9 deletions(-) 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 90020bff4..e464fd56f 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 @@ -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}/ 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 93dfd19b1..d90116ccc 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 @@ -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/ diff --git a/meta-digi-dey/recipes-connectivity/packagegroups/packagegroup-dey-wireless.bb b/meta-digi-dey/recipes-connectivity/packagegroups/packagegroup-dey-wireless.bb index 421e2f725..b065def27 100644 --- a/meta-digi-dey/recipes-connectivity/packagegroups/packagegroup-dey-wireless.bb +++ b/meta-digi-dey/recipes-connectivity/packagegroups/packagegroup-dey-wireless.bb @@ -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"