aboutsummaryrefslogtreecommitdiffstats
path: root/include/kernel-defaults.mk
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-12-03 09:16:23 +0100
committerRafał Miłecki <rafal@milecki.pl>2018-12-03 09:34:57 +0100
commit966ba6daa430922e41ca7598385817f5a611c9c7 (patch)
tree786efbdd6acfe24072dd8f0fcd53e0a44870d8c1 /include/kernel-defaults.mk
parent73127a878dca3da42c35400e2c63a24a2d664088 (diff)
downloadupstream-966ba6daa430922e41ca7598385817f5a611c9c7.tar.gz
upstream-966ba6daa430922e41ca7598385817f5a611c9c7.tar.bz2
upstream-966ba6daa430922e41ca7598385817f5a611c9c7.zip
kernel: fix downloading rcX releases
They are no longer stored in the "testing" subdirectory and are not available as .tar.xz archives. If -rc is detected download it from the git.kernel.org and use .tar.gz. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'include/kernel-defaults.mk')
-rw-r--r--include/kernel-defaults.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 5e905a2faa..cc1e2361be 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -21,16 +21,22 @@ export HOST_EXTRACFLAGS=-I$(STAGING_DIR_HOST)/include
# defined in quilt.mk
Kernel/Patch:=$(Kernel/Patch/Default)
+ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
+ LINUX_CAT:=xzcat
+else
+ LINUX_CAT:=zcat
+endif
+
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
define Kernel/Prepare/Default
- xzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
+ $(LINUX_CAT) $(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
- xzcat $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
+ $(LINUX_CAT) $(DL_DIR)/$(LINUX_SOURCE) | $(TAR) -C $(KERNEL_BUILD_DIR) $(TAR_OPTIONS)
endef
endif
else