# Copyright (C) 2017 Khem Raj # Released under the MIT license (see COPYING.MIT for the terms) DESCRIPTION = "Linux Backports" HOMEPAGE = "https://backports.wiki.kernel.org" SECTION = "kernel/modules" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" inherit module cml1 SHRT_VER = "${@d.getVar('PV', True).split('-')[0]}" SRC_URI = "http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v${SHRT_VER}/backports-${PV}.tar.gz \ file://0001-backport-of-build-patches-from-openwrt.patch \ file://0002-backport-of-subsys-patches-from-openwrt.patch \ file://0003-backport-of-ath-patches-from-openwrt.patch \ file://0004-backport-of-rt2x00-patches-from-openwrt.patch \ file://0005-backport-of-mwl-patches-from-openwrt.patch \ file://0006-backport-of-brcm-patches-from-openwrt.patch \ file://0007-backport-of-netmodule-patches-from-openwrt.patch \ file://config.netbird \ " SRC_URI[sha256sum] = "2b060db29386c6f3fb178df33e0b8256703b7e90f7e3799e8b5a26330ca6fc1e" S = "${WORKDIR}/backports-${PV}" DEPENDS += "coreutils-native flex-native bison-native" EXTRA_OEMAKE = "KLIB_BUILD=${STAGING_KERNEL_BUILDDIR} KLIB=${base_libdir}/modules/${KERNEL_VERSION}" KCONFIG_CONFIG_COMMAND = "${EXTRA_OEMAKE} CC=${BUILD_CC} menuconfig" export LEX = "flex" MAKE_TARGETS = "modules" PACKAGE_CONFIGFILE ?= "config.netbird" do_configure_prepend() { # Make sure kconf is built to run on the host unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS oe_runmake -C kconf CC=${BUILD_CC} conf # Copy our config as a defconfig if [ ! -n "${PACKAGE_CONFIGFILE}" ]; then bbfatal "mac80211: no config file given" fi cp ${WORKDIR}/${PACKAGE_CONFIGFILE} ${S}/.config oe_runmake oldconfig } # Create a meta package with another name, in this way we can # always build this receipe but only install the modules # when requiered. KERNEL_MODULES_META_PACKAGE = "kernel-module-mac80211" FILES_${KERNEL_MODULES_META_PACKAGE} = "" ALLOW_EMPTY_${KERNEL_MODULES_META_PACKAGE} = "1" PACKAGES += "${KERNEL_MODULES_META_PACKAGE}" PACKAGES_DYNAMIC += "^${KERNEL_PACKAGE_NAME}-module-.*" KERNEL_MODULE_AUTOLOAD += "\ compat \ mac80211 \ cfg80211 \ "