aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHamish Guthrie <hcg@openwrt.org>2008-10-10 10:07:45 +0000
committerHamish Guthrie <hcg@openwrt.org>2008-10-10 10:07:45 +0000
commit86ac8bc7ea0e5f72de0491a6cc03c38e4d3424a0 (patch)
treee2af1d1b2d76b5a32b4b9d37ce7422af463c1156 /include
parent6e85059256a5b98637033ad7e803011c512771cf (diff)
downloadupstream-86ac8bc7ea0e5f72de0491a6cc03c38e4d3424a0.tar.gz
upstream-86ac8bc7ea0e5f72de0491a6cc03c38e4d3424a0.tar.bz2
upstream-86ac8bc7ea0e5f72de0491a6cc03c38e4d3424a0.zip
Adds support for using a local clone of a git tree
SVN-Revision: 12941
Diffstat (limited to 'include')
-rw-r--r--include/kernel-defaults.mk20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 90761bf014..46f7e00046 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -34,19 +34,31 @@ endif
# defined in quilt.mk
Kernel/Patch:=$(Kernel/Patch/Default)
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
-define Kernel/Prepare/Default
+ ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
+ define Kernel/Prepare/Default
bzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
$(Kernel/Patch)
touch $(LINUX_DIR)/.quilt_used
-endef
-else
+ endef
+ else
+ ifeq ($(strip $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY)),"")
define Kernel/Prepare/Default
+ git clone $(CONFIG_KERNEL_GIT_CLONE_URI) $(LINUX_DIR)
+ endef
+ else
+ define Kernel/Prepare/Default
+ git clone --reference $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY) $(CONFIG_KERNEL_GIT_CLONE_URI) $(LINUX_DIR)
+ endef
+ endif
+endif
+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
+ endef
endif
ifeq ($(KERNEL),2.6)