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:
parent
5cce293895
commit
0f0a76a6f4
|
|
@ -27,7 +27,9 @@ SRC_URI += " \
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
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() {
|
do_configure_prepend() {
|
||||||
cp ${WORKDIR}/Makefile ${S}/
|
cp ${WORKDIR}/Makefile ${S}/
|
||||||
|
|
|
||||||
|
|
@ -44,14 +44,18 @@ endif
|
||||||
SRC := $(shell pwd)
|
SRC := $(shell pwd)
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
ifeq ($(ATH_ONLY_INSTALL_FW),)
|
||||||
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
|
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
|
||||||
|
endif
|
||||||
|
|
||||||
modules_install:
|
modules_install:
|
||||||
|
ifeq ($(ATH_ONLY_INSTALL_FW),)
|
||||||
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
|
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
|
||||||
# Fix installation directory of the modules.
|
# Fix installation directory of the modules.
|
||||||
find $(INSTALL_MOD_PATH)/lib/modules/$(KERNEL_VERSION)/extra/$(ATH_DRV_BASEDIR) -type f -name '*.ko' | \
|
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/
|
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)
|
rm -rf $(INSTALL_MOD_PATH)/lib/modules/*/extra/$(ATH_DRV_BASEDIR)
|
||||||
|
endif
|
||||||
# Install firmware
|
# Install firmware
|
||||||
mkdir -p $(INSTALL_MOD_PATH)/lib/firmware/ath6k/AR6003/hw2.1.1/
|
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/
|
install -m 0644 $(FIRMWARE) $(INSTALL_MOD_PATH)/lib/firmware/ath6k/AR6003/hw2.1.1/
|
||||||
|
|
|
||||||
|
|
@ -12,15 +12,13 @@ inherit packagegroup
|
||||||
|
|
||||||
WIRELESS_MODULE ?= ""
|
WIRELESS_MODULE ?= ""
|
||||||
WIRELESS_MODULE_append_mx5 = "${@base_contains('MACHINE_FEATURES', 'wifi', 'kernel-module-redpine', '', d)}"
|
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', 'kernel-module-atheros', '', d)}"
|
||||||
WIRELESS_MODULE_append_mxs = "${@base_contains('MACHINE_FEATURES', 'wifi', '${ATHEROS_WIRELESS_MODULE}', '', d)}"
|
|
||||||
|
|
||||||
RDEPENDS_${PN} = "\
|
RDEPENDS_${PN} = "\
|
||||||
wpa-supplicant \
|
|
||||||
wireless-tools \
|
|
||||||
crda \
|
crda \
|
||||||
|
wireless-tools \
|
||||||
|
wpa-supplicant \
|
||||||
${WIRELESS_MODULE} \
|
${WIRELESS_MODULE} \
|
||||||
"
|
"
|
||||||
|
|
||||||
RDEPENDS_${PN}_append_mx5 = "${WIRELESS_MODULE}"
|
RDEPENDS_${PN}_append_mxs = " iw"
|
||||||
RDEPENDS_${PN}_append_mxs = " iw ${WIRELESS_MODULE}"
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue