diff mbox

[OpenWrt-Devel] kernel.mk: handle major version dynamically

Message ID 1424698507-25515-1-git-send-email-zajec5@gmail.com
State Accepted
Delegated to: Michael Büsch
Headers show

Commit Message

Rafał Miłecki Feb. 23, 2015, 1:35 p.m. UTC
We can't simply hardcode v3.x directory name.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
 include/kernel.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/include/kernel.mk b/include/kernel.mk
index e21d53a..eb3e07a 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -52,7 +52,8 @@  else
   LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.xz
   TESTING:=$(if $(findstring -rc,$(LINUX_VERSION)),/testing,)
   ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
-      LINUX_SITE:=@KERNEL/linux/kernel/v3.x$(TESTING)
+      VER_DIR:=v$(word 1,$(subst ., ,$(LINUX_VERSION))).x
+      LINUX_SITE:=@KERNEL/linux/kernel/$(VER_DIR)$(TESTING)
   endif
 
   ifneq ($(TARGET_BUILD),1)