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

Rafał Miłecki zajec5 at gmail.com
Mon Feb 23 08:35:07 EST 2015


We can't simply hardcode v3.x directory name.

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

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)
-- 
1.8.4.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list