From: "Eugene San (eugenesan)" <eugene...@gmail.com>

Signed-off-by: Eugene San (eugenesan) <eugene...@gmail.com>
---
 include/target.mk |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/include/target.mk b/include/target.mk
index af32309..135561d 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -111,18 +111,20 @@ GENERIC_PLATFORM_DIR := $(TOPDIR)/target/linux/generic
 GENERIC_PATCH_DIR := $(GENERIC_PLATFORM_DIR)/patches$(if $(wildcard 
$(GENERIC_PLATFORM_DIR)/patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
 GENERIC_FILES_DIR := $(foreach dir,$(wildcard $(GENERIC_PLATFORM_DIR)/files 
$(GENERIC_PLATFORM_DIR)/files-$(KERNEL_PATCHVER)),"$(dir)")
 
-__config_name_list = $(1)/config-$(KERNEL_PATCHVER) $(1)/config-default
-__config_list = $(firstword $(wildcard $(call __config_name_list,$(1))))
+__config_name_list = $(1)/config-$(KERNEL_PATCHVER)$(2) $(1)/config-default$(2)
+__config_list = $(firstword $(wildcard $(call __config_name_list,$(1),$(2))))
 find_kernel_config=$(if $(__config_list),$(__config_list),$(lastword 
$(__config_name_list)))
 
-GENERIC_LINUX_CONFIG = $(call find_kernel_config,$(GENERIC_PLATFORM_DIR))
-LINUX_TARGET_CONFIG = $(call find_kernel_config,$(PLATFORM_DIR))
+GENERIC_LINUX_CONFIG = $(call find_kernel_config,$(GENERIC_PLATFORM_DIR),)
+LINUX_TARGET_CONFIG = $(call find_kernel_config,$(PLATFORM_DIR),)
 ifneq ($(PLATFORM_DIR),$(PLATFORM_SUBDIR))
-  LINUX_SUBTARGET_CONFIG = $(call find_kernel_config,$(PLATFORM_SUBDIR))
+  LINUX_SUBTARGET_CONFIG = $(call find_kernel_config,$(PLATFORM_SUBDIR),)
 endif
 
+LINUX_PROFILE_CONFIG = $(call 
find_kernel_config,$(PLATFORM_SUBDIR),-$(PROFILE))
+
 # config file list used for compiling
-LINUX_KCONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) 
$(LINUX_SUBTARGET_CONFIG) $(TOPDIR)/env/kernel-config)
+LINUX_KCONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) 
$(LINUX_SUBTARGET_CONFIG) $(LINUX_PROFILE_CONFIG) $(TOPDIR)/env/kernel-config)
 
 # default config list for reconfiguring
 # defaults to subtarget if subtarget exists and target does not
-- 
1.7.6

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to