From 441c26da6ad92b0d4529e1844736c55a31bfd45c Mon Sep 17 00:00:00 2001 From: Sandeep Sheriker Mallikarjun Date: Fri, 4 May 2018 10:27:46 -0700 Subject: kernel: fix build error for external kernel. fixed build error when external kernel is selected from menuconfig. The patches present in target/linux/generic does not gets applied to external kernel and build fails while compiling mac82011 & regmap-core kernel modules. as a fix added check in Makefile for CONFIG_EXTERNAL_KERNEL_TREE present or not. Signed-off-by: Sandeep Sheriker Mallikarjun --- package/kernel/mac80211/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'package/kernel/mac80211/Makefile') diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index f3e4d79c80..dc198eb542 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -1797,11 +1797,16 @@ ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),) endef endif -define Build/Configure - cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h - cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h - cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h -endef +#do not Build/Configure for EXTERNAL KERNEL +ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") + ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"") + define Build/Configure + cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h + cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h + cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h + endef + endif +endif define Build/Compile $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config -- cgit v1.2.3