diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/kernel-version.mk | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 6103cee63a..05b7a0d9c6 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -12,9 +12,20 @@ LINUX_KERNEL_HASH-4.4.112 = 544b42cbeed022896115c76a18fc97b4507d5b41d7ac0ce1dce9 LINUX_KERNEL_HASH-4.9.77 = 7c29bc3fb96f1e23d98f664e786dddd53a1599f56431b9b7fdfba402a4b3705c LINUX_KERNEL_HASH-4.14.14 = 8b96362eb55ae152555980e7193fe2585b487176fb936cc69b8947d7dd32044a +remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) +sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) + +ifneq ($(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),) + LINUX_VERSION:=$(call sanitize_uri,$(call remove_uri_prefix,$(CONFIG_KERNEL_GIT_CLONE_URI))) + ifeq ($(call qstrip,$(CONFIG_KERNEL_GIT_REF)),) + CONFIG_KERNEL_GIT_REF:=HEAD + endif + LINUX_VERSION:=$(LINUX_VERSION)-$(call sanitize_uri,$(CONFIG_KERNEL_GIT_REF)) +else ifdef KERNEL_PATCHVER LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER))) endif +endif split_version=$(subst ., ,$(1)) merge_version=$(subst $(space),.,$(1)) |