aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-02-22 03:44:15 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-02-22 03:44:15 +0000
commit800a95817d7d4bceb945f7924ce2c20891b1b22e (patch)
treefb34b3becf4fa3f414747974118a809e8e7106b0 /include
parent6bf50a5091bb7a97fda04115df5eee28efafaca5 (diff)
downloadupstream-800a95817d7d4bceb945f7924ce2c20891b1b22e.tar.gz
upstream-800a95817d7d4bceb945f7924ce2c20891b1b22e.tar.bz2
upstream-800a95817d7d4bceb945f7924ce2c20891b1b22e.zip
Reorganize kernel configs - target/linux/*/config is now a directory.
./config/default will replace the old config and config-diff (format is like config-diff, the full kernel config is no longer kept in the build system) This commit removes all the kernel config stuff, the next one will add the replacement - there's no way to do this atomically with svn. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6337 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/kernel-build.mk34
1 files changed, 22 insertions, 12 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index 23e694dc0c..c61dce3c0b 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -6,9 +6,16 @@
#
KERNEL_BUILD:=1
+include $(INCLUDE_DIR)/kernel-version.mk
+include $(INCLUDE_DIR)/host.mk
+include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/prereq.mk
--include ./config
+LINUX_CONFIG ?= ./config/default
+
+-include $(GENERIC_PLATFORM_DIR)/config-template
+-include $(LINUX_CONFIG)
+
ifneq ($(CONFIG_ATM),)
FEATURES += atm
endif
@@ -37,12 +44,6 @@ else
all: compile
endif
-include $(INCLUDE_DIR)/kernel-version.mk
-include $(INCLUDE_DIR)/host.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-LINUX_CONFIG:=./config
-
ifneq (,$(findstring uml,$(BOARD)))
LINUX_KARCH:=um
else
@@ -91,7 +92,11 @@ define Kernel/Configure/2.6
$(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" oldconfig prepare scripts
endef
define Kernel/Configure/Default
- @$(CP) $(LINUX_CONFIG) $(LINUX_DIR)/.config
+ @if [ -f "./config/profile-$(PROFILE)" ]; then \
+ $(SCRIPT_DIR)/config.pl '+' $(GENERIC_PLATFORM_DIR)/config-template '+' $(LINUX_CONFIG) ./config/profile-$(PROFILE) > $(LINUX_DIR)/.config; \
+ else \
+ $(SCRIPT_DIR)/config.pl '+' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_CONFIG) > $(LINUX_DIR)/.config; \
+ fi
endef
define Kernel/Configure
$(call Kernel/Configure/Default)
@@ -207,6 +212,7 @@ define Profile/Default
PACKAGES:=
endef
+confname=$(subst .,_,$(subst -,_,$(1)))
define Profile
$(eval $(call Profile/Default))
$(eval $(call Profile/$(1)))
@@ -216,9 +222,15 @@ define Profile
echo "Target-Profile-Name: $(NAME)"; \
echo "Target-Profile-Packages: $(PACKAGES)"; \
echo "Target-Profile-Description:"; \
+ if [ -f ./config/$(1) ]; then \
+ echo "Target-Profile-Kconfig: yes"; \
+ fi; \
getvar "$(call shvar,Profile/$(1)/Description)"; \
echo "@@"; \
echo;
+ ifeq ($(CONFIG_LINUX_$(call confname,$(KERNEL)_$(1))),y)
+ PROFILE=$(1)
+ endif
endef
$(eval $(call shexport,Target/Description))
@@ -228,11 +240,9 @@ prepare: $(LINUX_DIR)/.configured $(TMP_DIR)/.kernel.mk
compile: $(LINUX_DIR)/.modules
menuconfig: $(LINUX_DIR)/.prepared FORCE
$(call Kernel/Configure)
+ $(SCRIPT_DIR)/config.pl '+' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_CONFIG) > $(LINUX_DIR)/.config
$(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKEOPTS) menuconfig
- $(SCRIPT_DIR)/config.pl $(LINUX_DIR)/.config > $(PLATFORM_DIR)/config
-ifeq ($(KERNEL),2.6)
- $(SCRIPT_DIR)/config.pl '>' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_DIR)/.config > $(PLATFORM_DIR)/config-diff
-endif
+ $(SCRIPT_DIR)/config.pl '>' $(GENERIC_PLATFORM_DIR)/config-template $(LINUX_DIR)/.config > $(LINUX_CONFIG)
install: $(LINUX_DIR)/.image