summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorejka <ejka@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-11-20 13:21:01 +0000
committerejka <ejka@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-11-20 13:21:01 +0000
commit43440b4f1b5b7975718a6b5e804293d6e248e659 (patch)
treea5015a6117ba5c9a48e4043cd98be6cce3bb8083
parent3b8c7ad8bbd2eaa1228b6c90de0f0de55acbb3c1 (diff)
add external kernel tree support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9584 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--Config.in5
-rw-r--r--include/kernel-defaults.mk10
2 files changed, 15 insertions, 0 deletions
diff --git a/Config.in b/Config.in
index 9142ad371..c8b739c62 100644
--- a/Config.in
+++ b/Config.in
@@ -142,6 +142,11 @@ config SOURCE_FEEDS_REV
prompt "Revision for the source feed svn checkout" if BUILDOPTS
default ""
+config EXTERNAL_KERNEL_TREE
+ string
+ prompt "Use external kernel tree" if DEVEL
+ default ""
+
source "toolchain/Config.in"
menuconfig BUILDSYSTEM_SETTINGS
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 69ff8fa6f..1e0b28b2e 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -32,11 +32,21 @@ endif
# defined in quilt.mk
Kernel/Patch:=$(Kernel/Patch/Default)
+ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
define Kernel/Prepare/Default
bzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
$(Kernel/Patch)
$(if $(QUILT),touch $(LINUX_DIR)/.quilt_used)
endef
+else
+define Kernel/Prepare/Default
+ mkdir -p $(KERNEL_BUILD_DIR)
+ if [ -d $(LINUX_DIR) ]; then \
+ rmdir $(LINUX_DIR); \
+ fi
+ ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR)
+endef
+endif
define Kernel/Configure/2.4
$(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile