diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/linux.mk | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/linux/linux.mk b/linux/linux.mk index bba49216c..06792382a 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -15,7 +15,16 @@ LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL)) LINUX_SITE_METHOD = git else LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2 -LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6/ +# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order +# to use the $(word) function. We support versions such as 3.1, +# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc. +LINUX_VERSION_MAJOR = $(word 1,$(subst ., ,$(subst -, ,$(LINUX_VERSION)))) +LINUX_VERSION_MINOR = $(word 2,$(subst ., ,$(subst -, ,$(LINUX_VERSION)))) +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v$(LINUX_VERSION_MAJOR).$(LINUX_VERSION_MINOR)/ +# release candidates are in testing/ subdir +ifneq ($(findstring -rc,$(LINUX_VERSION)),) +LINUX_SITE = $(LINUX_SITE)testing/ +endif # -rc endif LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) |