MD5SUM:=$(LINUX_KERNEL_MD5SUM)
endef
+KERNEL_GIT_OPTS:=
+ifneq ($(strip $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY)),"")
+ KERNEL_GIT_OPTS+=--reference $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY)
+endif
+
+ifneq ($(strip $(CONFIG_KERNEL_GIT_BRANCH)),"")
+ KERNEL_GIT_OPTS+=--branch $(CONFIG_KERNEL_GIT_BRANCH)
+endif
+
+define Download/git-kernel
+ URL:=$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI))
+ PROTO:=git
+ VERSION:=$(CONFIG_KERNEL_GIT_BRANCH)
+ FILE:=$(LINUX_SOURCE)
+ SUBDIR:=linux-$(KERNEL_PATCHVER)
+ OPTS:=$(KERNEL_GIT_OPTS)
+endef
+
ifdef CONFIG_COLLECT_KERNEL_DEBUG
define Kernel/CollectDebug
rm -rf $(KERNEL_BUILD_DIR)/debug
define BuildKernel
$(if $(QUILT),$(Build/Quilt))
$(if $(LINUX_SITE),$(call Download,kernel))
+ $(if $(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),$(call Download,git-kernel))
.NOTPARALLEL:
# defined in quilt.mk
Kernel/Patch:=$(Kernel/Patch/Default)
-KERNEL_GIT_OPTS:=
-ifneq ($(strip $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY)),"")
- KERNEL_GIT_OPTS+=--reference $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY)
-endif
-
-ifneq ($(strip $(CONFIG_KERNEL_GIT_BRANCH)),"")
- KERNEL_GIT_OPTS+=--branch $(CONFIG_KERNEL_GIT_BRANCH)
-endif
-
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
define Kernel/Prepare/Default
endef
else
define Kernel/Prepare/Default
- git clone $(KERNEL_GIT_OPTS) $(CONFIG_KERNEL_GIT_CLONE_URI) $(LINUX_DIR)
+ xzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
endef
endif
else