aboutsummaryrefslogtreecommitdiffstats
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
commit2491d94adef5f909a4b2ea92679d7f77a7551772 (patch)
tree1e40581dfb849558ff8e5e774e5ce9cdbab8c30a
parent4802f81b70667e73a822710cd8a2482168ef6096 (diff)
downloadupstream-2491d94adef5f909a4b2ea92679d7f77a7551772.tar.gz
upstream-2491d94adef5f909a4b2ea92679d7f77a7551772.tar.bz2
upstream-2491d94adef5f909a4b2ea92679d7f77a7551772.zip
Adds support for using a local clone of a git tree
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12941 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--Config.in20
-rw-r--r--include/kernel-defaults.mk20
2 files changed, 36 insertions, 4 deletions
diff --git a/Config.in b/Config.in
index 95b9a4bc82..2e86d02cf5 100644
--- a/Config.in
+++ b/Config.in
@@ -159,6 +159,26 @@ config EXTERNAL_KERNEL_TREE
prompt "Use external kernel tree" if BUILDOPTS
default ""
+config KERNEL_GIT_CLONE_URI
+ string
+ prompt "Enter git repository to clone" if BUILDOPTS
+ default ""
+ help
+ Enter the full git repository path i.e.:
+ git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
+ This will create a git clone of the kernel in your build
+ directory.
+
+
+config KERNEL_GIT_LOCAL_REPOSITORY
+ string
+ prompt "Enter path to local reference repository" if BUILDOPTS
+ default ""
+ help
+ Enter a full pathname to a local reference git repository.
+ In this instance, the --refererence option of git clone will
+ be used thus creating a quick local clone of your repo.
+
source "toolchain/Config.in"
source "target/imagebuilder/Config.in"
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)